-
Notifications
You must be signed in to change notification settings - Fork 226
feat!: Suppress internal spans by default #1533
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
Changes from 6 commits
59ae02a
7185ad2
d9b44ce
c8df9ed
07d0a02
f8f0694
7ec9182
29f377e
a2b71e8
e7e5045
502b4da
9eb4e9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ def call(context) | |
| ) do |span| | ||
| MessagingHelper.inject_context_if_supported(context, client_method, service_id) | ||
|
|
||
| if HandlerHelper.instrumentation_config[:suppress_internal_instrumentation] | ||
| if HandlerHelper.skip_internal_instrumentation? | ||
|
Contributor
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. @kaylareopelle I realize this is a common pattern we have in the code base already but I would recommend we look into refactoring cases like this where we create separate mixins for "untraced" instead of evaluating this logic with every request. |
||
| OpenTelemetry::Common::Utilities.untraced { super } | ||
| else | ||
| super | ||
|
|
@@ -32,7 +32,6 @@ def call(context) | |
| OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE, | ||
| context.http_response.status_code | ||
| ) | ||
|
|
||
| if (err = response.error) | ||
| span.record_exception(err) | ||
| span.status = Trace::Status.error(err.to_s) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,18 +19,20 @@ module AwsSdk | |||||
| # - `false` **(default)** - Context key/value will not be added. | ||||||
| # - `true` - Context key/value will be added. | ||||||
| # | ||||||
| # ### `:suppress_internal_instrumentation` | ||||||
| # ### `:enable_internal_instrumentation` | ||||||
| # Enables tracing of spans of `internal` span kind. | ||||||
| # | ||||||
| # Disables tracing of spans of `internal` span kind. | ||||||
| # - `false` **(default)** - Internal spans are not traced | ||||||
| # - `true` - Internal spans are traced. | ||||||
| # | ||||||
| # - `false` **(default)** - Internal spans are traced. | ||||||
| # - `true` - Internal spans are not traced. | ||||||
| # ### `:suppress_internal_instrumentation` (deprecated) | ||||||
| # This configuration has been deprecated in a favor of `:enable_internal_instrumentation` | ||||||
| # | ||||||
| # @example An explicit default configuration | ||||||
| # @example An explicit default configurations | ||||||
|
||||||
| # @example An explicit default configurations | |
| # @example An explicit default configuration |
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.
Use spaces instead of tabs for indentation to maintain consistency with the rest of the file.