Categorygithub.com/DataDog/datadog-lambda-go
modulepackage
1.22.0
Repository: https://github.com/datadog/datadog-lambda-go.git
Documentation: pkg.go.dev

# README

datadog-lambda-go

build Code Coverage Slack Godoc License

Datadog Lambda Library for Go enables enhanced Lambda metrics, distributed tracing, and custom metric submission from AWS Lambda functions.

Installation

Follow the installation instructions, and view your function's enhanced metrics, traces and logs in Datadog.

Configurations

See the advanced configuration options to tag your telemetry, capture request/response payloads, filter or scrub sensitive information from logs or traces, and more.

Opening Issues

If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates.

When opening an issue, include the datadog-lambda-go version, go version, and stack trace if available. In addition, include the steps to reproduce when appropriate.

You can also open an issue for a feature request.

Contributing

If you find an issue with this package and have a fix, please feel free to open a pull request following the procedures.

Community

For product feedback and questions, join the #serverless channel in the Datadog community on Slack.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.

This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.

# Functions

AddTraceHeaders adds Datadog trace headers to a HTTP Request reflecting the current X-Ray subsegment.
Distribution sends a distribution metric to Datadog Deprecated: Use Metric method instead.
GetContext retrieves the last created lambda context.
GetTraceHeaders returns a map containing Datadog trace headers that reflect the current X-Ray subsegment.
InvokeDryRun is a utility to easily run your lambda for testing.
Metric sends a distribution metric to DataDog.
MetricWithTimestamp sends a distribution metric to DataDog with a custom timestamp.
WrapFunction is used to instrument your lambda functions.
WrapHandler is used to instrument your lambda functions.
WrapLambdaHandlerInterface is used to instrument your lambda functions.

# Constants

DatadogAPIKeyEnvVar is the environment variable that will be used to set the API key.
DatadogKMSAPIKeyEnvVar is the environment variable that will be sent to KMS for decryption, then used as an API key.
DatadogSiteEnvVar is the environment variable that will be used as the API host.
DatadogTraceEnabledEnvVar is the environment variable that enables Datadog tracing.
DefaultEnhancedMetrics enables enhanced metrics by default.
DefaultSite to send API messages to.
LogLevelEnvVar is the environment variable that will be used to set the log level.
MergeXrayTracesEnvVar is the environment variable that enables the merging of X-Ray and Datadog traces.
Initialize otel tracer provider if enabled.
ShouldUseLogForwarderEnvVar is the environment variable that enables log forwarding of metrics.
UniversalInstrumentation is the environment variable that enables universal instrumentation with the DD Extension.

# Structs

No description provided by the author