You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// add the Dynatrace tag or W3C Trace Context (based on your configuration) to request headers to allow
80
+
// the agent in the web server to link the request together for end-to-end tracing
81
+
tracer.InjectTracingHeaders((key,value,carrier)=>carrier[key]=value,request.Headers);// Option 2: passing a stateless implementation, which gets 'request.Headers' passed as 'carrier'
// add the Dynatrace tag or W3C Trace Context (based on your configuration) to request headers to allow
220
+
// the agent in the web server to link the request together for end-to-end tracing
221
+
tracer.InjectTracingHeaders((key,value,carrier)=>carrier[key]=value,request.Headers);// Option 2: passing a stateless implementation, which gets 'request.Headers' passed as 'carrier'
Copy file name to clipboardExpand all lines: src/Api/IOneAgentSdk.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ public interface IOneAgentSdk
61
61
/// <param name="serviceName">name of the remote service</param>
62
62
/// <param name="serviceEndpoint">logical deployment endpoint on the server side In case of a clustered/load balanced service, the serviceEndpoint represents the common logical endpoint (e.g. registry://staging-environment/myservices/serviceA) where as the @channelEndpoint represents the actual communication endpoint. As such a single serviceEndpoint can have many channelEndpoints.</param>
63
63
/// <param name="channelType">communication protocol used by remote call</param>
64
-
/// <param name="channelEndpoint">this represents the communication endpoint for the remote service. This information allows Dynatrace to tie the database requests to a specific process or cloud service. It is optional.
64
+
/// <param name="channelEndpoint">this represents the communication endpoint for the remote service. It is optional.
65
65
/// for TCP/IP: host name/IP of the server-side (can include port)
66
66
/// for UNIX domain sockets: path of domain socket file
Copy file name to clipboardExpand all lines: src/Api/IOutgoingWebRequestTracer.cs
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@
14
14
// limitations under the License.
15
15
//
16
16
17
+
usingSystem;
18
+
17
19
namespaceDynatrace.OneAgent.Sdk.Api
18
20
{
19
21
/// <summary>
@@ -47,5 +49,52 @@ public interface IOutgoingWebRequestTracer : ITracer, IOutgoingTaggable
47
49
/// </summary>
48
50
/// <param name="statusCode">HTTP status code returned by server</param>
49
51
voidSetStatusCode(intstatusCode);
52
+
53
+
/// <summary>
54
+
/// <para>Sets HTTP request headers required for linking requests end-to-end.</para>
55
+
/// <para>
56
+
/// Based on your configuration, this method will add the 'X-dynaTrace' header and/or the W3C Trace Context headers ('traceparent' and 'tracestate').<br/>
57
+
/// Therefore it is no longer necessary to manually add the Dynatrace tag and thus <see cref="IOutgoingTaggable.GetDynatraceStringTag"/>
58
+
/// must not be used together with this method.
59
+
/// </para>
60
+
/// <para>This method can only be called on an active tracer (i.e., between start and end).</para>
61
+
///
62
+
/// <para>Example usage:</para>
63
+
/// <example><code>
64
+
/// var requestHeaders = new Dictionary<string, string>();
Copy file name to clipboardExpand all lines: src/Dynatrace.OneAgent.Sdk.csproj
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
<PropertyGroup>
4
4
<TargetFramework>netstandard1.0</TargetFramework>
5
-
<Version>1.5.0</Version>
5
+
<Version>1.6.0</Version>
6
6
<Authors>Dynatrace</Authors>
7
7
<Product>Dynatrace OneAgent SDK for .NET</Product>
8
8
<Description>This SDK allows Dynatrace customers to instrument .NET applications. This is useful to enhance the visibility for proprietary frameworks or custom frameworks not directly supported by Dynatrace OneAgent out-of-the-box.
9
9
10
-
Requires Dynatrace OneAgent version 1.171 or newer installed.
10
+
Requires Dynatrace OneAgent version 1.173 or newer installed.
11
11
12
12
For further information (requirements, features, release notes) and samples see our readme on Github:
0 commit comments