Dynatrace
Route 1: Dynatrace OTel Collector
Section titled “Route 1: Dynatrace OTel Collector”Tails the files and sends them to Dynatrace’s OTLP endpoint, which takes protobuf over HTTP only:
receivers: file_log/artex: include: - /artex/audit/target.jsonl - /artex/audit/agent.jsonl start_at: beginning operators: - type: json_parser parse_to: attributes timestamp: parse_from: attributes.time layout_type: gotime layout: "2006-01-02T15:04:05.999999999Z07:00" severity: parse_from: attributes.severity_text # These describe the writer, so they go on the resource. - type: move from: attributes["service.name"] to: resource["service.name"] - type: move from: attributes["service.version"] to: resource["service.version"] - type: move from: attributes["service.instance.id"] to: resource["service.instance.id"] # Absent when serve runs without an engagement. - type: move if: 'attributes["artex.engagement_id"] != nil' from: attributes["artex.engagement_id"] to: resource["artex.engagement_id"]
processors: batch: {} transform/body: log_statements: - context: log statements: # time, severity_*, event_name and body are log record fields, not attributes. # Lifting body also drops the parsed line, which would otherwise still carry every field. - set(log.event_name, log.attributes["event_name"]) where log.attributes["event_name"] != nil - set(log.body, log.attributes["body"]) where log.attributes["body"] != nil - delete_matching_keys(log.attributes, "^(time|severity_number|severity_text|event_name|body)$")
exporters: otlphttp/dynatrace: endpoint: "${env:DT_ENDPOINT}/api/v2/otlp" headers: Authorization: "Api-Token ${env:DT_API_TOKEN}"
service: pipelines: logs: receivers: [file_log/artex] processors: [transform/body, batch] exporters: [otlphttp/dynatrace]The transform moves event_name and the short body summary into the log record, so attributes carry the fields and Dynatrace does not store the whole line again as content. A platform token works with Authorization: Bearer <token> and needs the openpipeline:logs:ingest scope (classic tokens: logs.ingest). Name only the active files: rotated generations (target.jsonl.<UTC time>, older ones .gz) must not match include.
Route 2: OneAgent or the Log Ingest API
Section titled “Route 2: OneAgent or the Log Ingest API”On a host with OneAgent, add a custom log source for the absolute paths of the stream files and a log ingest rule (both are needed). The Log Ingest API v2 also takes JSON Lines (Content-Type: application/jsonl), so any shipper can post the files as they are. Records older than 72 hours are rejected.
Storage and detections
Section titled “Storage and detections”- Built-in buckets have fixed retention (
default_logsis 35 days). For a 7-day copy, create a custom bucket per stream and add an OpenPipeline bucket assignment onartex.stream. A permission rule can restrict theanthropicstream to a smaller group. - Keep detection logic in ARTEX and alert on its records. A Davis anomaly detector with a records analyzer over this DQL fires per ARTEX alert:
fetch logs| filter service.name == "artex-cc" and event_name == "artex.alert"| fields timestamp, security_rule.name, artex.alert.severity, artex.identity, server.address, content- Rates, for example requests per attribution tag.
artex.identityon target traffic is the claimed label of an attribution tag, and each web UI chat conversation’s traffic carries its ownchat/<conversation id>label (capture_command_outputisartex/exec), so this separates chat conversations, ARTEX’s other clients and sessions you tagged yourself:
fetch logs| filter service.name == "artex-cc" and artex.stream == "target" and event_name == "artex.http"| makeTimeseries requests = count(), by:{artex.identity}- A stream that stops sending
artex.heartbeatrecords (every 60 seconds by default) means the writer or the shipper is down. Alert when the heartbeat count perartex.streamover five minutes drops to zero.
Planned
Section titled “Planned”- OTLP straight from ARTEX (#395) to
https://<environment-id>.live.dynatrace.com/api/v2/otlp, with protobuf over HTTP and anAuthorization: Api-Token <token>header, without a Collector. - Metrics (#396). Dynatrace rejects cumulative counters, so OTLP metrics would need delta temporality, and a scraped
/metricswould need the Collector’scumulativetodeltaprocessor. Scopes:openpipeline:metrics:ingest(classic tokens:metrics.ingest). - Runner resource attributes (#392). Dynatrace’s Claude Code monitoring uses Claude Code’s own telemetry. With ARTEX’s
artex.*resource attributes on theclaudeprocesses the web UI runner starts, both could be filtered by engagement in DQL.
Validation
Section titled “Validation”- Collector config:
dynatrace-otel-collector validate0.61.0 passed with placeholder endpoint and token. - The OneAgent setup, buckets and DQL were written from Dynatrace documentation only and were not run against a tenant.