Documentation ¶
Index ¶
- Constants
- func ExtendedContextWithMetadata[metaType any](baseCtx context.Context, metaKey any, metadata metaType) context.Context
- func GetContextMetadata[metaType any](baseCtx context.Context, metaKey any) (metaData metaType, isExist bool)
- func IsDatadogConfigured() bool
- func IsExperimentalTracingEnabled() bool
- type TraceContextKey
Constants ¶
View Source
const ( // ExperimentalTracingEnabled is the environment variable key determining if experimental tracing should be enabled. ExperimentalTracingEnabled = "DD_EXPERIMENTAL_TRACING_ENABLED" // DatadogEnvironment is the environment variable key determining the Datadog Environment to use. DatadogEnvironment = "DD_ENV" // DatadogService is the environment variable key for the name of the current service. DatadogService = "DD_SERVICE" // DatadogVersion is the environment variable key for the version of the current service. DatadogVersion = "DD_VERSION" )
Variables ¶
This section is empty.
Functions ¶
func ExtendedContextWithMetadata ¶
func ExtendedContextWithMetadata[metaType any](baseCtx context.Context, metaKey any, metadata metaType) context.Context
ExtendedContextWithMetadata add metadata to base context
func GetContextMetadata ¶
func GetContextMetadata[metaType any](baseCtx context.Context, metaKey any) (metaData metaType, isExist bool)
GetContextMetadata will try get form context.Context metadata
func IsDatadogConfigured ¶ added in v2.3.0
func IsDatadogConfigured() bool
IsDatadogConfigured checks some common environment-variables to determine if the service is configured to use Datadog.
func IsExperimentalTracingEnabled ¶ added in v2.2.0
func IsExperimentalTracingEnabled() bool
IsExperimentalTracingEnabled checks if experimental tracing is enabled
Types ¶
Directories ¶
Path | Synopsis |
---|---|
generated
|
|
mocks/DataDog/datadog-go/v5/statsd
Code generated by MockGen.
|
Code generated by MockGen. |
mocks/labstack/echo/v4
Code generated by MockGen.
|
Code generated by MockGen. |
mocks/metric
Code generated by MockGen.
|
Code generated by MockGen. |
Click to show internal directories.
Click to hide internal directories.