internal

package
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

type TraceContextKey

type TraceContextKey struct{}

TraceContextKey for tracer context metadata

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL