-
Notifications
You must be signed in to change notification settings - Fork 137
MongoDB traces - update semantic conventions to v1.39.0 #4791
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
Kielek
merged 70 commits into
open-telemetry:main
from
aviralgarg05:fix/mongodb-semconv-1.39.0
Feb 16, 2026
Merged
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
ec79c81
fix(mongodb): update semantic conventions to v1.39.0
aviralgarg05 44e93bf
docs(changelog): update changelog for mongodb semconv
aviralgarg05 abdf4d1
style(changelog): fix markdownlint line length error
aviralgarg05 d5e0dec
fix(mongodb): add schema url to activity source
aviralgarg05 92470b6
style(mongodb): fix stylecop member ordering issue
aviralgarg05 1f3bd66
style(mongodb): remove extra blank lines
aviralgarg05 20407ec
Refactor MongoDB instrumentation to set attributes at span creation
aviralgarg05 dea1b06
Address PR feedback for MongoDB instrumentation on fix/mongodb-semcon…
aviralgarg05 82b838d
Fix CI failures: Add missing usings for Activity/ActivityStatusCode a…
aviralgarg05 ea87ee3
Fix final CI issues: restore missing brace, fix import ordering, add …
aviralgarg05 37e18ef
Address PR feedback and fix remaining CI issues: simplify DatabaseAtt…
aviralgarg05 994ba3f
Restore Obsolete DbSystem constant for backward compatibility as per …
aviralgarg05 65e4e42
fix(test): remove network.peer.* attribute expectations from MongoDB …
aviralgarg05 dc60430
fix(test): make MongoDB test attribute validation more defensive
aviralgarg05 b3e6c23
fix(test): accept localhost or IP addresses for server.address valida…
aviralgarg05 23381c4
Fix(MongoDB): address PR feedback on network attributes and perf
aviralgarg05 7e06b79
fix(MongoDB): add missing System.Reflection using for PropertyInfo
aviralgarg05 067393b
fix: format code to comply with line length limits
aviralgarg05 de91955
fix: remove invalid ActivitySourceOptions usage
aviralgarg05 7c134d7
fix: add missing usings for MongoDB instrumentation and tests
aviralgarg05 8f5a63c
fix: add System namespace for MongoDB integrations
aviralgarg05 ed5fa3e
Fix linting errors (SA1516, SA1202, CA1810) in MongoDBInstrumentation.cs
aviralgarg05 c35cc18
Fix SA1516 lint error in NoCodeIntegrationHelper.cs
aviralgarg05 ca28b90
Fix formatting violation in NoCodeIntegrationHelper.cs
aviralgarg05 6af5356
Address PR feedback: update MongoDB semantic conventions v1.39.0 comp…
aviralgarg05 dcab72f
Fix compilation error and revert invalid ActivitySource constructor u…
aviralgarg05 56d614f
Fix MockSpansCollector SchemaUrl compilation errors
aviralgarg05 21a6eee
Set schema URL on ActivitySource in .NET 8+
aviralgarg05 1ff3dcc
Fix ActivitySourceOptions constructor syntax
aviralgarg05 aa82f95
ci: re-run CI to verify flaky test
aviralgarg05 2d81cc2
TelemetryUrl is supported by .NET Framework
Kielek b013319
cleanup usings
Kielek 9b2220f
revert unrelated changes
Kielek be88aad
Remove unused semantic convention key
Kielek 8499912
cleanup usings
Kielek 83618e5
Unify OnMethod error
Kielek 9fa1c8e
Handle OnError for MongoDB 3.5+ in the same way
Kielek afd2e7c
revert formatting
Kielek b12afc7
cleanup usings
Kielek 66801c7
revert formatting
Kielek 4bc66a9
cleanup usings
Kielek 08063d1
Rename const in test
Kielek 38974d9
remove redundant variable
Kielek 01dc332
remove redundant call to activity.SetStatus(ActivityStatusCod…
Kielek ff28dc6
Extract error.type to generic attributes
Kielek 47577ee
extract attribute to const
Kielek 18591e0
Address PR feedback: use FullName for exception type check and enhanc…
aviralgarg05 a157469
Fix null reference error and apply feedback on optional network attri…
aviralgarg05 6970608
fix: remove invalid URL with template placeholder from codacy instruc…
aviralgarg05 c1db02a
test: add MongoDB error trace tests and remove unrelated codacy instr…
aviralgarg05 1299fb9
test: validate db.response.status_code in MongoDB error spans
aviralgarg05 395d344
fix(mongodb): capture command error status code
aviralgarg05 dd6fa48
fix(mongodb): instrument sync 3.5+ wire protocol
aviralgarg05 789c1ac
chore(mongodb): update net462 instrumentation definitions
aviralgarg05 77c9d11
test(nocode): relax async span duration threshold
aviralgarg05 670a7df
Address MongoDB semconv review feedback
aviralgarg05 a99519e
Fix MongoDB review nits
aviralgarg05 d64a9b6
Reorder MongoDB query checks
aviralgarg05 de9de9e
Update generated MongoDB definitions
aviralgarg05 4c610a6
Align NoCodeTests with main
aviralgarg05 45e255e
Fix(MongoDB): address PR review comments
aviralgarg05 c718d78
Fix(MongoDB): restore QueryWireProtocol instrumentation
aviralgarg05 0585996
fix InstrumentMethods
ysolomchenko 0469126
update tests/remove comments
ysolomchenko fc49612
revert NoCodeTests.cs
ysolomchenko bcf951a
update changelog
ysolomchenko f8e8a3c
Merge upstream/main to resolve conflicts
aviralgarg05 6a8dc5b
Fix(CHANGELOG): remove stray hyphen
aviralgarg05 911c184
fix: use IntValue for db.response.status_code validation
aviralgarg05 11257a9
Merge branch 'main' into fix/mongodb-semconv-1.39.0
Kielek 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
Some comments aren't visible on the classic Files Changed page.
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
12 changes: 12 additions & 0 deletions
12
src/OpenTelemetry.AutoInstrumentation/Instrumentations/GenericAttributes.cs
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,12 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| namespace OpenTelemetry.AutoInstrumentation.Instrumentations; | ||
|
|
||
| internal static class GenericAttributes | ||
| { | ||
| internal static class Keys | ||
| { | ||
| public const string ErrorType = "error.type"; | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDB/DuckTypes/IBsonArrayProxy.cs
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,17 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| using OpenTelemetry.AutoInstrumentation.DuckTyping; | ||
|
|
||
| namespace OpenTelemetry.AutoInstrumentation.Instrumentations.MongoDB.DuckTypes; | ||
|
|
||
| /// <summary> | ||
| /// MongoDB.Bson.BsonArray interface for duck-typing | ||
| /// </summary> | ||
| internal interface IBsonArrayProxy : IDuckType | ||
| { | ||
| /// <summary> | ||
| /// Gets the number of elements in the array. | ||
| /// </summary> | ||
| public int Count { get; } | ||
| } |
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
17 changes: 17 additions & 0 deletions
17
...try.AutoInstrumentation/Instrumentations/MongoDB/DuckTypes/IMongoCommandExceptionProxy.cs
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,17 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| using OpenTelemetry.AutoInstrumentation.DuckTyping; | ||
|
|
||
| namespace OpenTelemetry.AutoInstrumentation.Instrumentations.MongoDB.DuckTypes; | ||
|
|
||
| /// <summary> | ||
| /// MongoDB.Driver.MongoCommandException interface for duck-typing | ||
| /// </summary> | ||
| internal interface IMongoCommandExceptionProxy : IDuckType | ||
| { | ||
| /// <summary> | ||
| /// Gets the error code. | ||
| /// </summary> | ||
| public int Code { get; } | ||
| } |
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
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.