/
TracingInterceptorOptions.cs
42 lines (36 loc) · 1.4 KB
/
TracingInterceptorOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using OpenTelemetry.Context.Propagation;
namespace Temporalio.Extensions.OpenTelemetry
{
/// <summary>
/// Options for creating an interceptor.
/// </summary>
public class TracingInterceptorOptions : ICloneable
{
/// <summary>
/// Gets or sets the Temporal header key.
/// </summary>
public string HeaderKey { get; set; } = "_tracer-data";
/// <summary>
/// Gets or sets the propagator.
/// </summary>
public TextMapPropagator Propagator { get; set; } = Propagators.DefaultTextMapPropagator;
/// <summary>
/// Gets or sets the tag name for workflow IDs. If null, no tag is created.
/// </summary>
public string? TagNameWorkflowId { get; set; } = "temporalWorkflowID";
/// <summary>
/// Gets or sets the tag name for run IDs. If null, no tag is created.
/// </summary>
public string? TagNameRunId { get; set; } = "temporalRunID";
/// <summary>
/// Gets or sets the tag name for activity IDs. If null, no tag is created.
/// </summary>
public string? TagNameActivityId { get; set; } = "temporalActivityID";
/// <summary>
/// Create a shallow copy of these options.
/// </summary>
/// <returns>A shallow copy of these options.</returns>
public virtual object Clone() => MemberwiseClone();
}
}