-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only attach instrumentation scope/service labels when non-empty #613
Conversation
droppedMessageEvents: int(span.DroppedEventsCount()), | ||
droppedLinks: int(span.DroppedLinksCount()), | ||
resource: r, | ||
instrumentationLibrary: instrumentationScopeLabels(is), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming this field to instrumentationScope
in a separate PR.
...er/collector/integrationtest/testdata/fixtures/logs/logs_apache_access_batches_expected.json
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #613 +/- ##
==========================================
- Coverage 63.37% 63.36% -0.02%
==========================================
Files 38 38
Lines 4409 4446 +37
==========================================
+ Hits 2794 2817 +23
- Misses 1491 1504 +13
- Partials 124 125 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Fixes #377
This updates the metrics and traces exporters (for SDK and collector) to only attach instrumentation library labels to GCP if those labels are non-empty as otel attributes. This applies even if the option to include instrumentation library labels is set to
true
.This also updates the metrics, traces, and logs exporters to do the same for service labels (also even if the service labels option is set to true).
This PR also makes updates to tests to prevent 2 tests overwriting each others' fixtures.
tl;dr I spent way too much time digging through Go internals, proto marshalling, and gzip libraries before I realized that the gzip test added in #576 overwrote another test's fixture. This prevented me from reproducing the bug's behavior. Now
make fixtures
will fail if it sees 2 tests writing to the same output fixture.