Skip to content

Conversation

hostejulien
Copy link

@hostejulien hostejulien commented Aug 4, 2025

Fixes #7016

This PR adds support for the experimental otel.sdk.processor.log.processed metric, emitted when a logger is created via the SDK. This metric follows the OpenTelemetry semantic conventions for SDK metrics.

As the feature is experimental, emission is gated behind the OTEL_GO_X_SELF_OBSERVABILITY environment variable. When set to any case-insensitive value of true, metrics will be recorded.

@pellared
Copy link
Member

pellared commented Aug 4, 2025

This PR adds support for the experimental otel.sdk.log.created

this is not what this PR is doing 😉

@hostejulien hostejulien changed the title Sdk observability : add experimental otel.sdk.log.created metric Sdk observability : add experimental otel.sdk.processor.log.processed metric Aug 4, 2025
@hostejulien
Copy link
Author

@pellared,
Title and description updated, thanks for the catch!

@hostejulien hostejulien marked this pull request as draft August 5, 2025 19:23
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.9%. Comparing base (84e3f3a) to head (e118397).
⚠️ Report is 74 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7127   +/-   ##
=====================================
  Coverage   82.9%   82.9%           
=====================================
  Files        265     265           
  Lines      24894   24926   +32     
=====================================
+ Hits       20643   20673   +30     
- Misses      3876    3878    +2     
  Partials     375     375           
Files with missing lines Coverage Δ
sdk/log/simple.go 100.0% <100.0%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hostejulien hostejulien force-pushed the sdk-observability-logs-simple-processor branch 2 times, most recently from d2e9e4e to cd36d4b Compare August 10, 2025 14:37
@hostejulien hostejulien marked this pull request as ready for review August 10, 2025 15:18
@hostejulien hostejulien marked this pull request as draft August 11, 2025 10:23
@flc1125
Copy link
Member

flc1125 commented Aug 11, 2025

Additionally: Please add a CHANGELOG.

@hostejulien hostejulien marked this pull request as ready for review August 11, 2025 13:41
Copy link
Member

@flc1125 flc1125 left a comment

Choose a reason for hiding this comment

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

A few minor tweaks are needed, thank you for your contribution.

@hostejulien hostejulien force-pushed the sdk-observability-logs-simple-processor branch from 56cd0fd to c460385 Compare August 12, 2025 08:16
@hostejulien
Copy link
Author

Really appreciate your quick and helpful feedback!
It made it much easier to get this feature done.

@pellared
Copy link
Member

@hostejulien, from https://github.com/open-telemetry/opentelemetry-go/blob/main/CONTRIBUTING.md:

Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request. Rewriting Git history makes it difficult to keep track of iterations during code review.

@hostejulien
Copy link
Author

@pellared, Got it. Thanks for the heads up!

@pellared pellared changed the title Sdk observability : add experimental otel.sdk.processor.log.processed metric sdk/log: self-observability: simple processor metrics Aug 12, 2025
@pellared
Copy link
Member

pellared commented Sep 1, 2025

@hostejulien PTAL #7272

@flc1125
Copy link
Member

flc1125 commented Sep 11, 2025

Hi, since this process involves specification adjustments and historical review records (which may contain invalid review suggestions), it’s impossible to tell which items need attention amid the large volume of information.

Could we create a new PR based on the current branch before preparing for the review, so that subsequent reviews can proceed more smoothly?

Thanks~

@MrAlias MrAlias added the area:logs Part of OpenTelemetry logs label Sep 15, 2025
@MrAlias
Copy link
Contributor

MrAlias commented Sep 15, 2025

@hostejulien please take a look at #7016. I have updated the issue with a check list of items from our project Observability guidelines that need to be completed in this PR.

As @flc1125 pointed out, you may find it easier to open a new PR. But feel free to update this PR as well. If you plan to update this PR, please mark it as a draft while you are working to address the items listed in #7016 and the Observability guidelines.

@MrAlias MrAlias added this to the v1.39.0 milestone Sep 15, 2025
@MrAlias
Copy link
Contributor

MrAlias commented Oct 7, 2025

@hostejulien I just wanted to check in with this PR. Are you still able to update this PR or open a new PR to address the instrumentation requirements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:logs Part of OpenTelemetry logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logs SDK observability - simple processor metrics

4 participants