@@ -28,8 +28,9 @@ type Config struct {
2828
2929// ResourceConfig configures the enrichment of resource attributes.
3030type ResourceConfig struct {
31- AgentName AttributeConfig `mapstructure:"agent_name"`
32- AgentVersion AttributeConfig `mapstructure:"agent_version"`
31+ AgentName AttributeConfig `mapstructure:"agent_name"`
32+ AgentVersion AttributeConfig `mapstructure:"agent_version"`
33+ OverrideHostName AttributeConfig `mapstructure:"override_host_name"`
3334}
3435
3536// ScopeConfig configures the enrichment of scope attributes.
@@ -55,6 +56,7 @@ type ElasticTransactionConfig struct {
5556 Type AttributeConfig `mapstructure:"type"`
5657 Result AttributeConfig `mapstructure:"result"`
5758 EventOutcome AttributeConfig `mapstructure:"event_outcome"`
59+ InferredSpans AttributeConfig `mapstructure:"inferred_spans"`
5860}
5961
6062// ElasticSpanConfig configures the enrichment attributes for the spans
@@ -72,15 +74,24 @@ type ElasticSpanConfig struct {
7274 EventOutcome AttributeConfig `mapstructure:"event_outcome"`
7375 ServiceTarget AttributeConfig `mapstructure:"service_target"`
7476 DestinationService AttributeConfig `mapstructure:"destination_service"`
77+ InferredSpans AttributeConfig `mapstructure:"inferred_spans"`
7578}
7679
7780// SpanEventConfig configures enrichment attributes for the span events.
7881type SpanEventConfig struct {
7982 // TimestampUs is a temporary attribute to enable higher
8083 // resolution timestamps in Elasticsearch. For more details see:
8184 // https://github.com/elastic/opentelemetry-dev/issues/374.
82- TimestampUs AttributeConfig `mapstructure:"timestamp_us"`
83- ProcessorEvent AttributeConfig `mapstructure:"processor_event"`
85+ TimestampUs AttributeConfig `mapstructure:"timestamp_us"`
86+ TransactionSampled AttributeConfig `mapstructure:"transaction_sampled"`
87+ TransactionType AttributeConfig `mapstructure:"transaction_type"`
88+ ProcessorEvent AttributeConfig `mapstructure:"processor_event"`
89+
90+ // For exceptions/errors
91+ ErrorID AttributeConfig `mapstructure:"error_id"`
92+ ErrorExceptionHandled AttributeConfig `mapstructure:"error_exception_handled"`
93+ ErrorGroupingKey AttributeConfig `mapstructure:"error_grouping_key"`
94+ ErrorGroupingName AttributeConfig `mapstructure:"error_grouping_name"`
8495}
8596
8697// AttributeConfig is the configuration options for each attribute.
@@ -92,8 +103,9 @@ type AttributeConfig struct {
92103func Enabled () Config {
93104 return Config {
94105 Resource : ResourceConfig {
95- AgentName : AttributeConfig {Enabled : true },
96- AgentVersion : AttributeConfig {Enabled : true },
106+ AgentName : AttributeConfig {Enabled : true },
107+ AgentVersion : AttributeConfig {Enabled : true },
108+ OverrideHostName : AttributeConfig {Enabled : true },
97109 },
98110 Scope : ScopeConfig {
99111 ServiceFrameworkName : AttributeConfig {Enabled : true },
@@ -111,6 +123,7 @@ func Enabled() Config {
111123 Result : AttributeConfig {Enabled : true },
112124 EventOutcome : AttributeConfig {Enabled : true },
113125 RepresentativeCount : AttributeConfig {Enabled : true },
126+ InferredSpans : AttributeConfig {Enabled : true },
114127 },
115128 Span : ElasticSpanConfig {
116129 TimestampUs : AttributeConfig {Enabled : true },
@@ -122,10 +135,17 @@ func Enabled() Config {
122135 ServiceTarget : AttributeConfig {Enabled : true },
123136 DestinationService : AttributeConfig {Enabled : true },
124137 RepresentativeCount : AttributeConfig {Enabled : true },
138+ InferredSpans : AttributeConfig {Enabled : true },
125139 },
126140 SpanEvent : SpanEventConfig {
127- TimestampUs : AttributeConfig {Enabled : true },
128- ProcessorEvent : AttributeConfig {Enabled : true },
141+ TimestampUs : AttributeConfig {Enabled : true },
142+ TransactionSampled : AttributeConfig {Enabled : true },
143+ TransactionType : AttributeConfig {Enabled : true },
144+ ProcessorEvent : AttributeConfig {Enabled : true },
145+ ErrorID : AttributeConfig {Enabled : true },
146+ ErrorExceptionHandled : AttributeConfig {Enabled : true },
147+ ErrorGroupingKey : AttributeConfig {Enabled : true },
148+ ErrorGroupingName : AttributeConfig {Enabled : true },
129149 },
130150 }
131151}
0 commit comments