otlp: switch to UTR endpoint#2186
Conversation
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
f4cb869 to
335bdfc
Compare
|
Can you merge this PR with #2292? In #2292 Rafael added a global config knob to turn on and off UTR for metrics and logs. We could reuse that config for trace. Can you add a few commits to Rafa's PR, adding the processors needed for trace UTR, the OTLP exporter configuration for the trace endpoint (https://github.com/GoogleCloudPlatform/ops-agent/pull/2186/changes#diff-bcf4db7b1ead9873183e1c4b42f5022443169df5866d48e713032a239e9d74f6), and the integration tests. Leave out the trace-only config in this PR. Thanks |
f3a3e9e to
440c4f2
Compare
| if _, ok := span.Labels["g.co/r/gce_instance/instance_id"]; ok { | ||
| t.Errorf("Unexpected legacy attribute g.co/r/gce_instance/instance_id found in span %q", span.Name) | ||
| } | ||
| if val, ok := span.Labels["custom.resource.attribute"]; ok { |
There was a problem hiding this comment.
I dont think foundResourceAttr, foundSpanAttr variables are needed here.
the logic can be simplified to
val, ok := span.Labels["custom.resource.attribute"]
if !ok
{ t.Errorf(t.Error("Resource attribute 'custom.resource.attribute' not found in trace spans"))}
if val != "my-resource-value" {
t.Errorf("Expected custom.resource.attribute to be 'my-resource-value', got %q", val)
}
| t.Errorf("Expected custom.resource.attribute to be 'my-resource-value', got %q", val) | ||
| } | ||
| } | ||
| if val, ok := span.Labels["custom.span.attribute"]; ok { |
There was a problem hiding this comment.
Same here i think we can simplify this logic and avoid the foundSpanAttr variable.
4b7407c
into
westphalrafael/otlp_exporter_config_knob
Adds option to send traces to UTR endpoint instead. No-op by default.