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

Remove event logger #1480

Draft
wants to merge 4 commits into
base: 2.x
Choose a base branch
from
Draft

Remove event logger #1480

wants to merge 4 commits into from

Conversation

brettmc
Copy link
Collaborator

@brettmc brettmc commented Jan 16, 2025

Event Logger has been removed from spec, in favour of Logger.EmitEvent. We have deprecated EventLogger in main, this removes it from 2.x and adds EmitEvent as its replacement.

@brettmc brettmc requested a review from a team as a code owner January 16, 2025 00:03
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 72.12%. Comparing base (145b87f) to head (f25fda3).

Files with missing lines Patch % Lines
src/API/Logs/LogRecord.php 0.00% 3 Missing ⚠️
src/SDK/Logs/ReadableLogRecord.php 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #1480      +/-   ##
============================================
- Coverage     72.20%   72.12%   -0.08%     
+ Complexity     2730     2713      -17     
============================================
  Files           401      395       -6     
  Lines          8152     8091      -61     
============================================
- Hits           5886     5836      -50     
+ Misses         2266     2255      -11     
Flag Coverage Δ
8.2 72.03% <58.33%> (-0.13%) ⬇️
8.3 72.03% <58.33%> (-0.08%) ⬇️
8.4 72.01% <58.33%> (-0.14%) ⬇️
8.5 72.08% <58.33%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/API/Globals.php 100.00% <100.00%> (ø)
src/API/Instrumentation/CachedInstrumentation.php 100.00% <ø> (ø)
src/API/Instrumentation/Configurator.php 100.00% <ø> (ø)
src/API/Instrumentation/ContextKeys.php 100.00% <ø> (ø)
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% <ø> (ø)
src/Contrib/Otlp/LogsConverter.php 93.75% <100.00%> (+0.24%) ⬆️
src/SDK/Logs/Exporter/ConsoleExporter.php 100.00% <100.00%> (ø)
src/SDK/Sdk.php 100.00% <ø> (ø)
src/SDK/SdkAutoloader.php 93.75% <ø> (-0.17%) ⬇️
src/SDK/SdkBuilder.php 100.00% <ø> (ø)
... and 2 more

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 145b87f...f25fda3. Read the comment docs.

@@ -35,4 +36,16 @@ public function isEnabled(): bool
{
return false;
}

public function emitEvent(
Copy link
Contributor

Choose a reason for hiding this comment

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

Add @codeCoverageIgnore to this method emitEvent

/**
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/logs/api.md#emit-an-event
*/
public function emitEvent(
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't add this method until it is defined by the spec.
(Was removed in open-telemetry/opentelemetry-specification#4352)

Copy link
Collaborator Author

@brettmc brettmc Jan 16, 2025

Choose a reason for hiding this comment

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

Good catch. I'll remove this portion for now. Converted to a draft to wait and see what the replacement might be.

was just removed from spec, replacement is not defined yet.
@brettmc brettmc changed the title Remove event logger, add logger.emitEvent Remove event logger Jan 16, 2025
@brettmc brettmc marked this pull request as draft January 16, 2025 23:06
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.

3 participants