Skip to content
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

PoC: experimental Trace SDK self-observability metrics #6153

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Jan 10, 2025

Part of #2547

This adds the OTEL_GO_X_SELF_OBSERVABILITY feature gate, the otel.sdk.span.processor.queue_size metric behind it.

Note: I opted for a single environment variable for all SDKs and for all signals, rather than multiple environment variables.

TODO:

  • Add unit tests
  • Wait for experimental semantic conventions to be merged

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.2%. Comparing base (007fb1f) to head (2876e28).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6153     +/-   ##
=======================================
- Coverage   82.2%   82.2%   -0.1%     
=======================================
  Files        273     274      +1     
  Lines      23744   23923    +179     
=======================================
+ Hits       19539   19672    +133     
- Misses      3856    3891     +35     
- Partials     349     360     +11     

see 7 files with indirect coverage changes

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start, I like the approach. 👍

sdk/trace/batch_span_processor.go Show resolved Hide resolved
@dashpole
Copy link
Contributor Author

Turns out there are already proposed semantic conventions: open-telemetry/semantic-conventions#1631

@dashpole dashpole force-pushed the experimental_sdk_metrics branch 2 times, most recently from 18534c3 to dda5658 Compare January 23, 2025 03:23
@dashpole
Copy link
Contributor Author

I updated this to match the proposed conventions.

@dashpole dashpole force-pushed the experimental_sdk_metrics branch from dda5658 to 21e5323 Compare January 28, 2025 21:03
…ocessor.spans_processed self-observability metrics
@dashpole dashpole force-pushed the experimental_sdk_metrics branch from 21e5323 to f508b24 Compare January 28, 2025 21:08
@dashpole dashpole changed the title Add initial experimental SDK self-observability metric PoC: experimental Trace SDK self-observability metrics Jan 30, 2025
@dashpole dashpole force-pushed the experimental_sdk_metrics branch from 95ddc6f to 5d6f316 Compare January 30, 2025 21:41
@dashpole
Copy link
Contributor Author

This now implements all of the proposed conventions (although those may still change). I didn't implement it (yet) for the OTLP http proto or json exporters or for the simple span processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants