This repository was archived by the owner on Mar 4, 2026. It is now read-only.
refactor: Add settings attributes to trace spans.#2181
Merged
Conversation
347f9a5 to
000432f
Compare
ehsannas
commented
Sep 5, 2024
| // Re-use the existing EnabledTraceUtil if one has been created. | ||
| if (this._traceUtil && this._traceUtil instanceof EnabledTraceUtil) { | ||
| return this._traceUtil; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Since we are now capturing settings as part of the trace attributes, if the settings change we need to also change the traceUtil instance. So we should not re-use the existing one.
milaGGL
reviewed
Sep 10, 2024
| this.settingsAttributes[`${ATTRIBUTE_SETTINGS_PREFIX}.max_idle_channels`] = | ||
| settings.maxIdleChannels ?? DEFAULT_MAX_IDLE_CHANNELS; | ||
|
|
||
| const defaultRetrySettings = serviceConfig.retry_params.default; |
Contributor
There was a problem hiding this comment.
why there are retry and timeout configuration? how this is related to otel tracing?
Contributor
Author
There was a problem hiding this comment.
this code is adding trace attributes to the spans. The purpose is that if a user has misconfigured their SDK, their configurations will surface in the trace and may provide insights into the issues they're running into. This is similar to the Java impl. Although not all java configurations exist in the node.js SDK.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds settings attributes to spans. This information could be useful when debugging performance issues.