-
Notifications
You must be signed in to change notification settings - Fork 465
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
Global error handler cleanup - Metrics SDK #2185
Closed
lalitb
wants to merge
24
commits into
open-telemetry:main
from
lalitb:global-error-handler-cleanup-metrics-sdk
Closed
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
704b848
initial commit
lalitb b8cb6af
change name for exponential histogram
lalitb a0b6eee
Merge branch 'main' into global-error-handler-cleanup-metrics-sdk
lalitb acf97fa
rever changes
lalitb 7b48f14
Update opentelemetry-sdk/src/metrics/internal/mod.rs
lalitb ac61b79
convert otel_error to otel_warn for cardinality limit
lalitb a42d516
log both existing and new instrument values
lalitb dbaa7f5
Merge branch 'main' into global-error-handler-cleanup-metrics-sdk
lalitb 73fca4d
build error
lalitb ee5c5f5
Merge branch 'global-error-handler-cleanup-metrics-sdk' of github.com…
lalitb 3aa97cf
remove formatting in wrapper macros
lalitb de54afe
Merge branch 'main' into global-error-handler-cleanup-metrics-sdk
lalitb e62de04
Merge branch 'main' into global-error-handler-cleanup-metrics-sdk
lalitb bda9faa
review comments
lalitb 4a34922
resolve conflict
lalitb 0087c24
lint error
lalitb 115e73f
add comment for exponential histogram
lalitb 56682a4
fix
lalitb 7e48cbf
Update opentelemetry-sdk/src/metrics/internal/mod.rs
lalitb d81b374
use message for otel_warn
lalitb 4b09c92
merge conflict
lalitb 949930e
Update opentelemetry-sdk/src/metrics/meter.rs
lalitb 6dcc9eb
Update opentelemetry-sdk/src/metrics/internal/mod.rs
lalitb 4b42fe8
Update opentelemetry-sdk/src/metrics/meter.rs
lalitb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
}; | ||
|
||
use opentelemetry::{ | ||
global, | ||
metrics::{MetricsError, Result}, | ||
otel_error, | ||
}; | ||
|
||
use super::{ | ||
|
@@ -84,9 +84,7 @@ | |
if inner.sdk_producer.is_none() { | ||
inner.sdk_producer = Some(pipeline); | ||
} else { | ||
global::handle_error(MetricsError::Config( | ||
"duplicate reader registration, did not register manual reader".into(), | ||
)) | ||
otel_error!(name: "ManualReader.RegisterPipeline.DuplicateRegistration"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. info/debug only. Even if a user gets this message, they won't know what to do. Its helpful to us only. |
||
} | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the inner workings enough to give a strong opinion - but unless this is a auto recoverable error, this can flood the error log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As what I can understand this part of code, this error occurs with restrictive
max_size
configuration, while the application is recording measurements with values that are far apart than what allowed bymax_size
. And error would be logged whenever the faulty measurement is recorded. If these faulty measurements are not frequent, the error log won't be flooded, else it can. Again, either some kind of throttling or simply flag to log only once need to be added. Let me know what you suggest, else I can keep TODO to revisit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we are 100% sure this cannot cause flooding of logs, lets remove the log from here, and leave a TODO to add logging once we understand more.