[APMSVLS-464][APMSVLS-463] fix: Configure span kind and peer tag stats#1189
Draft
lucaspimentel wants to merge 4 commits intomainfrom
Draft
[APMSVLS-464][APMSVLS-463] fix: Configure span kind and peer tag stats#1189lucaspimentel wants to merge 4 commits intomainfrom
lucaspimentel wants to merge 4 commits intomainfrom
Conversation
Tests verify that StatsConcentratorService computes stats for spans with span.kind and populates peer_tags in output. Both tests currently fail due to empty span_kinds_stats_computed and peer_tag_keys vecs passed to SpanConcentrator::new(). 🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
Pass STATS_ELIGIBLE_SPAN_KINDS and DEFAULT_PEER_TAG_KEYS to SpanConcentrator::new() to match the Go agent defaults. This enables stats for OTel spans with span.kind and adds per-dependency granularity via peer tags for client/producer/consumer spans. 🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Configure
SpanConcentratorin bottlecap with the Go agent's defaultComputeStatsBySpanKindspan kinds andbasePeerTagspeer tag keys, fixing two gaps in agent-side trace stats computation:APMSVLS-464:span_kinds_stats_computedwas empty, so non-top-level, non-measured spans withspan.kind=server/client/producer/consumer) were silently excluded from stats.APMSVLS-463:peer_tag_keyswas empty, so client/producer/consumer spans had no per-dependency granularity in stats output (e.g., all S3 buckets, DynamoDB tables, Kafka topics lumped together).Changes
STATS_ELIGIBLE_SPAN_KINDSconstant (4 span kinds matching the Go agent'sKindsComputed)DEFAULT_PEER_TAG_KEYSconstant (43 peer tag keys matching the Go agent'sbasePeerTagsfrommappings.json)SpanConcentrator::new()instead of empty vecsStatsConcentratorServicepipeline for both featuresFollow-up
Move the constants to
datadog-agent-configinserverless-componentsso both bottlecap and serverless-compat can share them.Testing
test_span_kind_stats_computed: sends a non-root, non-measured client span through the service, verifies stats are produced withspan_kind="client"test_peer_tags_populated: sends a client span withdb.instanceanddb.systemmeta, verifiespeer_tagscontains both in the stats output