diff --git a/enrichments/trace/internal/elastic/attributes.go b/enrichments/trace/internal/elastic/attributes.go index ee4db48..f232845 100644 --- a/enrichments/trace/internal/elastic/attributes.go +++ b/enrichments/trace/internal/elastic/attributes.go @@ -23,7 +23,7 @@ const ( AttributeAgentVersion = "agent.version" // span attributes - AttributeTransactionRoot = "transaction.root" + AttributeTraceRoot = "trace.root" AttributeTransactionName = "transaction.name" AttributeTransactionType = "transaction.type" AttributeTransactionResult = "transaction.result" diff --git a/enrichments/trace/internal/elastic/span.go b/enrichments/trace/internal/elastic/span.go index 01f407d..19e7c6c 100644 --- a/enrichments/trace/internal/elastic/span.go +++ b/enrichments/trace/internal/elastic/span.go @@ -162,7 +162,7 @@ func (s *spanEnrichmentContext) enrichTransaction( cfg config.ElasticTransactionConfig, ) { if cfg.TraceRoot.Enabled { - span.Attributes().PutBool(AttributeTransactionRoot, isTraceRoot(span)) + span.Attributes().PutBool(AttributeTraceRoot, isTraceRoot(span)) } if cfg.Name.Enabled { span.Attributes().PutStr(AttributeTransactionName, span.Name()) diff --git a/enrichments/trace/internal/elastic/span_test.go b/enrichments/trace/internal/elastic/span_test.go index 412ea76..d619c8b 100644 --- a/enrichments/trace/internal/elastic/span_test.go +++ b/enrichments/trace/internal/elastic/span_test.go @@ -43,7 +43,7 @@ func TestElasticTransactionEnrich(t *testing.T) { input: ptrace.NewSpan(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "", AttributeEventOutcome: "success", AttributeTransactionResult: "Success", @@ -65,7 +65,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "HTTP 2xx", @@ -87,7 +87,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "HTTP 1xx", @@ -108,7 +108,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "HTTP 5xx", @@ -130,7 +130,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "OK", @@ -152,7 +152,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "Internal", @@ -169,7 +169,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "Success", @@ -186,7 +186,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "failure", AttributeTransactionResult: "Error", @@ -203,7 +203,7 @@ func TestElasticTransactionEnrich(t *testing.T) { }(), config: config.Enabled().Transaction, enrichedAttrs: map[string]any{ - AttributeTransactionRoot: true, + AttributeTraceRoot: true, AttributeTransactionName: "testtxn", AttributeEventOutcome: "success", AttributeTransactionResult: "Success",