-
Notifications
You must be signed in to change notification settings - Fork 34
feat(tracing): OTel improvements from go-fan review #8841
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bb4953c
Initial plan
Copilot 0646910
feat(tracing): OTel improvements from go-fan review
Copilot 2276597
fix: address review feedback on RecordSpanErrorSafe test and fanout.g…
Copilot ad70306
Potential fix for pull request finding
lpcox 2cb54aa
Potential fix for pull request finding
lpcox a16eb57
Potential fix for pull request finding
lpcox a05d22d
fix(tracing): add missing closing brace in span_helpers_test.go
Copilot 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 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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| // Package tracing provides OpenTelemetry OTLP trace export for the MCP Gateway. | ||
| // This file is the single source of truth for go.opentelemetry.io/otel/semconv/v1.41.0 | ||
| // imports in the tracing package. All callers inside and outside this package should | ||
| // reference these re-exports so that upgrading semconv only requires editing this file. | ||
| package tracing | ||
|
|
||
| import ( | ||
| "go.opentelemetry.io/otel/attribute" | ||
| semconv "go.opentelemetry.io/otel/semconv/v1.41.0" | ||
| ) | ||
|
|
||
| // SchemaURL is the semconv schema URL for this semantic conventions version. | ||
| const SchemaURL = semconv.SchemaURL | ||
|
|
||
| // HTTP and URL semantic convention attribute keys. | ||
| const ( | ||
| // HTTPRequestMethodKey is the HTTP request method. | ||
| HTTPRequestMethodKey = semconv.HTTPRequestMethodKey | ||
| // HTTPRouteKey is the matched HTTP route template. | ||
| HTTPRouteKey = semconv.HTTPRouteKey | ||
| // HTTPResponseStatusCodeKey is the HTTP response status code. | ||
| HTTPResponseStatusCodeKey = semconv.HTTPResponseStatusCodeKey | ||
| // URLPathKey is the full URL path. | ||
| URLPathKey = semconv.URLPathKey | ||
| // ServerAddressKey is the server domain name or IP address. | ||
| ServerAddressKey = semconv.ServerAddressKey | ||
| ) | ||
|
|
||
| // Error semantic convention keys. | ||
| const ( | ||
| // ErrorTypeKey is the attribute key for error.type. | ||
| ErrorTypeKey = semconv.ErrorTypeKey | ||
| ) | ||
|
|
||
| // GenAI semantic convention attribute keys (semconv/v1.41.0). | ||
| // gen_ai.system was removed from the spec; see GenAISystem in genai_attrs.go. | ||
| const ( | ||
| // GenAIToolName is the name of the tool utilized by the agent. | ||
| GenAIToolName = semconv.GenAIToolNameKey | ||
| // GenAIOperationName is the name of the operation being performed. | ||
| GenAIOperationName = semconv.GenAIOperationNameKey | ||
| // GenAIConversationID is the unique identifier for a conversation (session). | ||
| GenAIConversationID = semconv.GenAIConversationIDKey | ||
| // GenAIAgentName is the human-readable name of the GenAI agent. | ||
| GenAIAgentName = semconv.GenAIAgentNameKey | ||
| // GenAIAgentID is the unique identifier of the GenAI agent (server ID). | ||
| GenAIAgentID = semconv.GenAIAgentIDKey | ||
| ) | ||
|
|
||
| // ErrorType returns the error.type attribute KeyValue for err. | ||
| // It wraps semconv.ErrorType so callers outside this package can use it | ||
| // without importing the semconv package directly. | ||
| func ErrorType(err error) attribute.KeyValue { | ||
| return semconv.ErrorType(err) | ||
| } | ||
|
|
||
| // ServiceName returns the service.name attribute KeyValue for val. | ||
| func ServiceName(val string) attribute.KeyValue { | ||
| return semconv.ServiceName(val) | ||
| } | ||
|
|
||
| // ServiceVersion returns the service.version attribute KeyValue for val. | ||
| func ServiceVersion(val string) attribute.KeyValue { | ||
| return semconv.ServiceVersion(val) | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.