# Packages
Package telemetrytest provides a mock implementation of the telemetry client for testing purposes.
# Functions
BoolConfig returns a Configuration struct with a bool value.
Check is a testing utility to assert that a target key in config contains the expected value.
Disabled returns whether instrumentation telemetry is disabled according to the DD_INSTRUMENTATION_TELEMETRY_ENABLED env var.
FloatConfig returns a Configuration struct with a float value.
IntConfig returns a Configuration struct with a int value.
Integrations returns which integrations are tracked by telemetry.
LoadIntegration notifies telemetry that an integration is being used.
MockGlobalClient replaces the global telemetry client with a custom implementation of TelemetryClient.
Sanitize ensures the configuration values are valid and compatible.
SetAgentlessEndpoint is used for testing purposes to replace the real agentless endpoint with a custom one.
StringConfig returns a Configuration struct with a string value.
Time is used to track a distribution metric that measures the time (ms) of some portion of code.
WithAPIKey sets the DD API KEY for the telemetry client.
WithEnv sets the app specific environment for the telemetry client.
WithHTTPClient specifies the http client for the telemetry client.
WithNamespace sets name as the telemetry client's namespace (tracer, profiler, appsec).
WithService sets the app specific service for the telemetry client.
WithURL sets the URL for where telemetry information is flushed to.
WithVersion sets the app specific version for the telemetry client.
# Constants
NamespaceAppSec is for application security management.
NamespaceGeneral is for general use.
NamespaceProfilers is for continuous profiling.
NamespaceTracers is for distributed tracing.
RequestTypeAppClientConfigurationChange is sent if there are changes to the client library configuration.
RequestTypeAppClosing is sent when the telemetry client is stopped.
RequestTypeAppHeartbeat is sent periodically by the client to indicate that the app is still running.
RequestTypeAppIntegrationsChange is sent when the telemetry client starts with info on which integrations are used.
RequestTypeAppProductChange is sent when products are enabled/disabled.
RequestTypeAppStarted is the first message sent by the telemetry client, containing the configuration loaded at startup.
RequestTypeDependenciesLoaded is sent if DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED is enabled.
RequestTypeDistributions is to send distribution type metrics accumulated by the client, and is sent periodically along with the heartbeat.
RequestTypeGenerateMetrics contains count, gauge, or rate metrics accumulated by the client, and is sent periodically along with the heartbeat.
# Variables
GlobalClient acts as a global telemetry client that the tracer, profiler, and appsec products will use.
LogPrefix specifies the prefix for all telemetry logging.
MetricKindCount represents a count type metric.
MetricKindDist represents a distribution type metric.
MetricKindGauge represents a gauge type metric.
# Structs
AdditionalPayload can be used to add extra information to the app-started event.
Application is identifying information about the app itself.
AppStarted corresponds to the "app-started" request type.
Body is the common high-level structure encapsulating a telemetry request body.
Configuration is a library-specific configuration value that should be initialized through StringConfig, IntConfig, FloatConfig, or BoolConfig.
ConfigurationChange corresponds to the `AppClientConfigurationChange` event that contains information about configuration changes since the app-started event.
Dependencies stores a list of dependencies.
Dependency is a Go module on which the application depends.
DistributionMetrics corresponds to the "distributions" request type.
DistributionSeries is a sequence of observations for a distribution metric.
Error stores error information about various tracer events.
Host is identifying information about the host on which the app is running.
Integration is an integration that is configured to be traced automatically.
IntegrationsChange corresponds to the app-integrations-change requesty type.
Metrics corresponds to the "generate-metrics" request type.
ProductDetails specifies details about a product.
Products specifies information about available products.
ProductsPayload is the top-level key for the app-product-change payload.
RemoteConfig contains information about remote-config.
Request captures all necessary information for a telemetry event submission.
Series is a sequence of observations for a single named metric.
# Interfaces
Client buffers and sends telemetry messages to Datadog (possibly through an agent).
# Type aliases
MetricKind specifies the type of metric being reported.
Namespace describes an APM product to distinguish telemetry coming from different products used by the same application.
An Option is used to configure the telemetry client's settings.
RequestType determines how the Payload of a request should be handled.