Skip to main content

AI tool logs

This integration supplies Q247 with data on how the team uses tools based on large language models: how much time they spend in them, how many tokens they consume, how much it costs and how many lines of code come from them. The standard for receiving this data is OpenTelemetry, so the mechanism is prepared for any AI tool that reports in this format. The source implemented and supported today is Claude Code; adding another tool requires a module that reads its data, with no changes to the integration itself.

Without this integration, AI adoption still works, but it relies solely on detecting commit messages, so it shows the share of work produced with AI without costs and token consumption.

Operating principle

The AI tool running on the developer's computer exports telemetry to the address you point it at. The Enterprise Plugin collects this data, aggregates it daily per user and passes the result to Q247. Neither the conversations with the model nor the content of the prompts are part of this integration: what gets transferred are counters.

Data is linked to Q247 accounts by the e-mail address that the AI tool signs its telemetry with. Address matching is described by AI adoption in Configuration.

OTel Collector variant

The AI tool sends metrics directly to the OpenTelemetry collector built into the Enterprise Plugin.

  • What the Client does: configures the telemetry export in the AI tool and, if necessary, exposes the collector port on the internal network.
  • What Q247 does: delivers the collector as part of the plugin.
  • Changes on the Client side: no additional monitoring platform and no database.
  • Who it is for: organizations without an APM-class tool in place.

An example configuration in the Claude Code organization settings:

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://ep-plugin.company.com:4318",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer TOKEN",
"OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "http://ep-plugin.company.com:4318/v1/logs",
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_METRICS_EXPORTER": "otlp"
}
}
Treat the collector address and the token as sensitive data

In the example, ep-plugin.company.com and TOKEN are placeholder values. The OTEL_EXPORTER_OTLP_HEADERS header carries the token that authorizes sending telemetry, so the same rules apply to it as to any other credential: it does not end up in a repository or in a ticket, and it is rotated on the Client side.

Expose the collector itself on the internal network only. If it has to be reachable more widely, put TLS termination in front of it, because the telemetry contains user e-mail addresses and project names.

Dynatrace SaaS variant

The AI tool sends metrics to Dynatrace, the same way as the rest of the monitoring data. The Enterprise Plugin pulls them from Dynatrace on a daily cycle.

  • What the Client does: configures the export to Dynatrace and provides the environment address plus an API token with the metrics read permission.
  • What Q247 does: configures the plugin's connection to Dynatrace.
  • Changes on the Client side: none in the firewall, because the plugin connects outbound to Dynatrace.
  • Who it is for: organizations that already use Dynatrace.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://TENANT.live.dynatrace.com/api/v2/otlp/v1/metrics",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Api-Token TOKEN",
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_METRICS_EXPORTER": "otlp"
}
}
A daily cycle means a day of delay

In the Dynatrace variant, cost and token data appears in Q247 with a delay of up to one day. Verifying the configuration on the same day it was introduced therefore shows nothing.

Data available after launch

  • Time spent working in the AI tool, broken down by user.
  • Token count and cost, set against the number of licenses purchased.
  • Number of lines generated by the AI tool, set against work produced without it.

All of this data is shown by the AI adoption widget on the dashboards.

Prerequisites

  • The Enterprise Plugin running in the Client's infrastructure, the same component that analyzes the repositories.
  • An AI tool with telemetry export enabled in the OpenTelemetry standard, directed at the chosen destination.
  • A chosen metrics delivery variant, the collector inside the plugin or Dynatrace.
  • An account with the Admin role in Q247, because only that role opens the Configuration tab.
  • E-mail addresses in the AI tool matching the addresses of Q247 accounts, or a readiness to match manually those that differ.

Network traffic

ConnectionDirectionRequired
AI tool → collector inside the pluginwithin the Client's networkyes, in the OTel Collector variant
AI tool → Dynatraceoutbound from the Clientyes, in the Dynatrace variant
Plugin → Dynatraceoutbound from the Clientyes, in the Dynatrace variant
Plugin → Q247outbound from the Clientyes
Q247 → pluginnoneno

Step-by-step launch

  1. Variant choice: the collector inside the plugin or Dynatrace, depending on whether the organization already has a monitoring platform.
  2. Export configuration in the AI tool: the env block in the organization settings, following the example for the chosen variant.
  3. Reception configuration: the collector is part of the plugin, and the Dynatrace variant needs the environment address and a metrics read token, both passed to the Q247 deployment team.
  4. Turning visibility on in the AI adoption section in Configuration.
  5. Matching e-mail addresses, after one or two working days, once the telemetry has had time to arrive.

Verification

The first data appears after a few hours in the collector variant and after a day in the Dynatrace variant. Addresses showing up in the "Unmapped AI tool users" section in Configuration confirm that telemetry reaches Q247 and that only the link to accounts is missing. An entry in the "address with no data" category that persists for several days points to an error in the address itself.

Data scope

What reaches Q247 are daily, aggregated counters: time worked, token count, cost, number of generated lines and the e-mail address these values belong to. Prompts, model responses and code content stay in the AI tool and in the infrastructure where the plugin runs.

See also

  • AI adoption: the settings on the Q247 side, commit patterns and account mapping
  • AI adoption: the widget and how to read the data
  • Language model: the second AI integration, the one behind the AI Assistant
  • Enterprise Plugin: the component that receives the telemetry