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

Review and audit of EventSource logging for self-diagnostics #2543

Open
alanwest opened this issue Oct 28, 2021 · 1 comment
Open

Review and audit of EventSource logging for self-diagnostics #2543

alanwest opened this issue Oct 28, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@alanwest
Copy link
Member

OpenTelemetry .NET uses EventSource for internal logging. Each component defines an EventSource including the API, SDK, and each of the exporters and instrumentation components.

The purpose of this issue is threefold:

  1. Review the usage of these EventSource's for correctness in what gets logged and where it gets logged.

Example of incorrectness:BaseExporter.Shutdown logs a span processor related error when there is a failure. This error should not be about spans or processors:

catch (Exception ex)
{
OpenTelemetrySdkEventSource.Log.SpanProcessorException(nameof(this.Shutdown), ex);
return false;
}

  1. Improve coverage of diagnostic logging by identifying gaps.

Example: Sometimes (but not always) we have TODOs throughout the code highlighting gaps where a diagnostic log may be useful, but has not been implemented yet. Here is an example where an attempt to update a metric has failed:

// TODO: Measurement dropped due to internal exception.

  1. Aim to make diagnostic logging actionable

Based on this comment #2525 (comment), we should seek to provide actionable guidance when there are errors. For example, if an error is due to misconfiguration, then the log message should give an indication for how to resolve the error.

Related in-flight work

The following PR was held off until the post-1.0 release. It may be beneficial to land this work prior to the review of self-diagnostics:

#1529

References

OpenTelemetry general error handling guidelines/self-diagnostics
OpenTelemetry .NET self-diagnostics guide

Copy link
Contributor

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Aug 22, 2024
@cijothomas cijothomas removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants