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

Deprecate event logger #3285

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

owent
Copy link
Member

@owent owent commented Feb 21, 2025

Fixes #3193

Changes

  • Remove event logger and provider in ABI v2
  • Deprecate event logger and provider in ABI v1
  • Add some attributes to .clang-format to fix some format error on Windows.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@owent owent requested a review from a team as a code owner February 21, 2025 07:37
Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 0ab2698
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/67bbd8ba6ad9cc0008696cfb

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.41%. Comparing base (021eb99) to head (0ab2698).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3285   +/-   ##
=======================================
  Coverage   89.41%   89.41%           
=======================================
  Files         207      207           
  Lines        6457     6457           
=======================================
  Hits         5773     5773           
  Misses        684      684           
Files with missing lines Coverage Δ
api/include/opentelemetry/logs/event_logger.h 90.00% <ø> (ø)
...include/opentelemetry/logs/event_logger_provider.h 100.00% <ø> (ø)
api/include/opentelemetry/logs/noop.h 77.78% <ø> (ø)
api/include/opentelemetry/logs/provider.h 100.00% <100.00%> (ø)
...ntelemetry/sdk/metrics/state/sync_metric_storage.h 86.37% <ø> (ø)
sdk/src/logs/event_logger.cc 70.59% <ø> (ø)
sdk/src/logs/event_logger_provider.cc 100.00% <ø> (ø)
sdk/src/logs/event_logger_provider_factory.cc 100.00% <ø> (ø)

@owent owent force-pushed the deprecate_event_logger branch from 37f6452 to 7c97425 Compare February 21, 2025 09:36
"gsl_byte": "cpp"
} //,
//"editor.formatOnSave": false
}
Copy link
Member

Choose a reason for hiding this comment

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

is this file intended?

Copy link
Member

Choose a reason for hiding this comment

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

This file contains path locals to the dev machine, so it should probably not be added, at least as is.

@owent Please confirm if this is intended, or remove.

@@ -26,8 +26,7 @@ namespace exception
* It's no longer recommended to record exceptions that are handled and do not escape the scope of a
* span.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kExceptionEscaped = "exception.escaped";
OPENTELEMETRY_DEPRECATED static constexpr const char *kExceptionEscaped = "exception.escaped";
Copy link
Member

@lalitb lalitb Feb 24, 2025

Choose a reason for hiding this comment

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

Are these semconv modified by clang-format? Do you think we can scope it in separate PR if really required?

- OPENTELEMETRY_LOCAL_SYMBOL
- OPENTELEMETRY_EXPORT
- OPENTELEMETRY_SANITIZER_NO_MEMORY
- OPENTELEMETRY_SANITIZER_NO_THREAD
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this formatting in separate PR. I don't think it is related to deprecating event logger.

@lalitb
Copy link
Member

lalitb commented Feb 24, 2025

@owent thanks for the PR. The event logger related changes look good in general. However, can we move the clang formatting related changes out of scope of this PR? we can have separate PR for that if needed.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

This change contains two independent parts:

  • deprecation (abi v1) and removal (abi v2) of the event logger
  • clang-format changes with compiler attributes macros

Approving this PR because both look ok.

See comments on vscode file.

@owent For future work, please separate independent changes in different PRs.

This helps with the git history, and helps when a backport is needed to an older branch for some fixes.

@marcalff
Copy link
Member

Waiting on clarifications and/or cleanup for vscode file, before merging.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

Deprecate event logger
3 participants