-
Notifications
You must be signed in to change notification settings - Fork 376
[Instrumentation.Remoting] initial implementation #3829
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
Open
lewis800
wants to merge
51
commits into
open-telemetry:main
Choose a base branch
from
lewis800:remoting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 44 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
205e59f
[Remoting] Init Commit, following project standards
lewis800 11dc424
[Remoting] Using lib helper for assembly version
lewis800 caa3454
[Remoting] Removing Deprecated rpc.service
lewis800 a15aa9b
[Remoting] new constructor for tracer provider, formatting and sdk
lewis800 3fbe3b8
[Remoting] Implemented Enrich option and RecordException, added
lewis800 4c31300
[Remoting] Fixing Test, in consideration of new options and semantics
lewis800 d3e8792
[Remoting] Update readme, and workflows with code new codeowner and
lewis800 233ccff
[Remoting] Moving Tags into StartActivity to allow for HeadSampling
lewis800 905c90e
[Remoting] Removing rpc.netframework_remoting.uri as it is not apart …
lewis800 7bbc667
Update src/OpenTelemetry.Instrumentation.Remoting/Implementation/Tele…
lewis800 a7d0a14
Update src/OpenTelemetry.Instrumentation.Remoting/TracerProviderBuild…
lewis800 e613985
Update src/OpenTelemetry.Instrumentation.Remoting/TracerProviderBuild…
lewis800 81acbbc
[Remoting] making configure delegate lazy
lewis800 ffa136d
[Remoting] Adding asserts for registering dynamic property only once
lewis800 d07e5f0
[Remoting] passing in remoting options to remove warnings
lewis800 adc75b2
[Remoting] ensure appdomain unload is called if tests fail
lewis800 23c6aec
[Remoting] Adding in additional tags as per 1.39 of semantic conventions
lewis800 4857bc5
[Remoting] Updating rpc.system.name based on feedback from semantic r…
lewis800 13e5c42
Update src/OpenTelemetry.Instrumentation.Remoting/README.md
lewis800 0128866
[Remoting] Updating Readme to reference OpenTelemetry.Exporter.OpenTe…
lewis800 25b1b97
[Remoting] Adding change log and small markdown fix
lewis800 ce755a5
[Remoting] Adjusting RemotingInstrumentationEnrichEventNames to be in…
lewis800 b766b5f
[Remoting] refactored to de dup
lewis800 ff4d60e
[Remoting] Changing link to perma link
lewis800 571156a
[Remoting] refactored new private helper GetFullyQualifiedMethod to d…
lewis800 10cc4c1
Apply suggestion from @martincostello
lewis800 398e96e
Apply suggestions from code review
lewis800 caef9a5
[Remoting] Updating langword for RecordException default to false
lewis800 28460ee
[Remoting] Passing in ActivitySource to improve testability and addin…
lewis800 50a655a
[Remoting] Updating test to reflect rpc.system.name change
lewis800 085a9e4
[Remoting] Updating public api to remove RemotingInstrumentationEnric…
lewis800 9f2b9aa
[Remoting] fix: adjusting readme exporter example
lewis800 ca2a44a
Apply suggestion from @martincostello
lewis800 df891c2
[Remoting] fix: Making serviceNameCache not static for testability
lewis800 1a196d5
[Remoting] fix: use Interlocked for dynamic sink registration count
lewis800 95b115a
[Remoting] fix: emit telemetry schema URL for activity source
lewis800 5562dcf
[Remoting] Apply suggestions from code review
lewis800 690cc4b
[Remoting] Renaming for readability
lewis800 70111dd
[Remoting] Simplify null check
lewis800 36903c9
[Remoting] static first in order, and rename msg > message
lewis800 0d016a0
[Remoting] feat: Migrating to use SemanticConventions.cs constants
lewis800 40e1d1f
[Remoting] Fix Linting
lewis800 0cb35f2
[Remoting] Update remoting instrumentation to cache reloadable options
lewis800 4d0b953
[Remoting] fix changing options from method to property
lewis800 3ba2493
[Remoting] Fix comment semantic version, simplify array init
lewis800 06efa83
Merge branch 'open-telemetry:main' into remoting
lewis800 73467f8
[Remoting] Refine enrich callbacks and activity source handling
lewis800 9ad23a3
[Remoting] Removing unused code
lewis800 f33a531
[Remoting] Remove RecordException
lewis800 6e389fa
Merge branch 'open-telemetry:main' into remoting
lewis800 a3ef99e
Merge branch 'main' into remoting
lewis800 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Enrich.get -> System.Action<System.Diagnostics.Activity!, string!, System.Runtime.Remoting.Messaging.IMethodMessage!>? | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Enrich.set -> void | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Filter.get -> System.Func<System.Runtime.Remoting.Messaging.IMessage!, bool>? | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Filter.set -> void | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Propagator.get -> OpenTelemetry.Context.Propagation.TextMapPropagator! | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.Propagator.set -> void | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.RecordException.get -> bool | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.RecordException.set -> void | ||
| OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions.RemotingInstrumentationOptions() -> void | ||
| OpenTelemetry.Trace.TracerProviderBuilderExtensions | ||
| static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddRemotingInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder! | ||
| static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddRemotingInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Instrumentation.Remoting.RemotingInstrumentationOptions!>? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! |
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
20 changes: 20 additions & 0 deletions
20
...emetry.Instrumentation.Remoting/Implementation/RemotingInstrumentationEnrichEventNames.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,20 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| namespace OpenTelemetry.Instrumentation.Remoting; | ||
|
|
||
| /// <summary> | ||
| /// Defines the event names used by the Remoting instrumentation Enrich callback. | ||
| /// </summary> | ||
| internal static class RemotingInstrumentationEnrichEventNames | ||
| { | ||
| /// <summary> | ||
| /// Event name for when a remoting message starts processing. | ||
| /// </summary> | ||
| internal const string OnMessageStart = "OnMessageStart"; | ||
|
|
||
| /// <summary> | ||
| /// Event name for when a remoting message finishes processing. | ||
| /// </summary> | ||
| internal const string OnMessageFinish = "OnMessageFinish"; | ||
| } |
58 changes: 58 additions & 0 deletions
58
...enTelemetry.Instrumentation.Remoting/Implementation/RemotingInstrumentationEventSource.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,58 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| using System.Diagnostics.Tracing; | ||
| using OpenTelemetry.Internal; | ||
|
|
||
| namespace OpenTelemetry.Contrib.Instrumentation.Remoting.Implementation; | ||
|
|
||
| [EventSource(Name = "OpenTelemetry-Instrumentation-Remoting")] | ||
| internal class RemotingInstrumentationEventSource : EventSource | ||
| { | ||
| public static readonly RemotingInstrumentationEventSource Log = new(); | ||
|
|
||
| [NonEvent] | ||
| public void MessageFilterException(Exception ex) | ||
| { | ||
| if (this.IsEnabled(EventLevel.Error, (EventKeywords)(-1))) | ||
| { | ||
| this.MessageFilterException(ex.ToInvariantString()); | ||
| } | ||
| } | ||
|
|
||
| [Event(1, Message = "InstrumentationFilter threw an exception. Message will not be collected. Exception {0}.", Level = EventLevel.Error)] | ||
| public void MessageFilterException(string exception) | ||
| { | ||
| this.WriteEvent(1, exception); | ||
| } | ||
|
|
||
| [NonEvent] | ||
| public void DynamicSinkException(Exception ex) | ||
| { | ||
| if (this.IsEnabled(EventLevel.Error, (EventKeywords)(-1))) | ||
| { | ||
| this.DynamicSinkException(ex.ToInvariantString()); | ||
| } | ||
| } | ||
|
|
||
| [Event(2, Message = "DynamicSink message processor threw an exception. Remoting activity will not be recorded. Exception {0}.", Level = EventLevel.Error)] | ||
| public void DynamicSinkException(string exception) | ||
| { | ||
| this.WriteEvent(2, exception); | ||
| } | ||
|
|
||
| [NonEvent] | ||
| public void EnrichmentException(Exception ex) | ||
| { | ||
| if (this.IsEnabled(EventLevel.Error, (EventKeywords)(-1))) | ||
| { | ||
| this.EnrichmentException(ex.ToInvariantString()); | ||
| } | ||
| } | ||
|
|
||
| [Event(3, Message = "Enrichment threw exception. Exception {0}.", Level = EventLevel.Error)] | ||
| public void EnrichmentException(string exception) | ||
| { | ||
| this.WriteEvent(3, exception); | ||
| } | ||
| } | ||
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.