What's Changed
This release includes several new features for various APM integrations, including a new opt-in service naming schema, improvements to contrib/gocql
and the ability to add HTTP headers to traces in several integrations. In addition, there are a number of small bug fixes and improvements for APM, ASM and the Profiler.
Application Security Management (ASM) no longer requires CGO to be compiled. The appsec
build tag is still required for now for a progressive roll-out and will be removed in the next few months. Read more in below's ASM section.
Application Performance Monitoring (APM)
Peer Service naming schema
This release introduces a new opt-in service naming approach, aiming to make service names more consistent. You can opt-in to this new service naming setting DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED="true"
and DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true
.
For fine-tuned control of your service names, you can configure DD_TRACE_PEER_SERVICE_MAPPING
, providing comma-separated key:value mapping rule pairs, similar to how DD_SERVICE_MAPPING
is configured today.
HTTP Header Tags
This release includes a new feature to add HTTP headers as trace tags for several integrations:
- contrib/emicklei/go-restful
- contrib/gin-gonic/gin
- contrib/go-chi/chi.v5
- contrib/go-chi/chi
- contrib/gorilla/mux
- contrib/labstack/echo.v4
- contrib/labstack/echo
- contrib/urfave/negroni
- contrib/net/http
The feature can be configured globally with the WithHeaderTags
option to tracer.Start()
, or individually for each integration with the WithHeaderTags
options available in each integration package. It accepts a map of case-insensitive header keys to tag names and automatically applies matching header values as tags on traces, e.g. CASE-insensitive-Header:my-tag-name,User-ID:userId,My-Header-And-Tag-Name
. Also accepts entries without a specified tag name that are automatically mapped to tags of the form http.request.headers.<header-name>
.
APM Changelog
- contrib/aws: fix sns nil pointer dereference by @satorunooshie in #2025
- ddtrace/tracer: implement peer.service by @rarguelloF in #1975
- internal/namingschema: add config flag to disable default integration service names by @rarguelloF in #2007
- tracer: fix telemetry metrics to align with spec by @katiehockman in #2049
- contrib/gocql: add NewCluster function to trace clients by @rarguelloF in #2057
- contrib/google.golang.org/grpc: Fallback to dynamic service names if no global is found by @ajgajg1134 in #2051
- build(deps): bump github.com/gofiber/fiber/v2 from 2.24.0 to 2.43.0 by @dependabot in #2045
- set a bigger timeout for the windows by @dianashevchenko in #2059
- ddtrace/tracer: Fix TestSpanTracePushSeveral by @ajgajg1134 in #2062
- tracer: request Headers as tags for web integrations by @mtoffl01 in #1764
- tracer: discard invalid _dd.p.tid in the datadog propagator by @ahmed-mez in #2076
- ddtrace/tracer: added W3C tracecontext extract benchmark by @dianashevchenko in #2074
- ddtrace/opentelemetry: improve TestSpanContextWithStartOptions by @katiehockman in #2063
- ddtrace: removed outdated tag by @dianashevchenko in #2086
- Added WithErrorCheck option to redis by @lsgndln in #2040
- contrib/net/http: make roundTripper propagation (inject, extract) optional by @rangelrealecb in #1224
- contrib/emicklei/go-restful/v3: add integration for newest version by @michaelbeaumont in #2088
- contrib/emicklei/go-restful.v3: move to the correct folder by @rarguelloF in #2092
- ddtrace/tracer: changed default tracecontext propagation order by @dianashevchenko in #2072
- contrib/gocql: add WithCustomTag option by @rarguelloF in #2105
- ddtrace/tracer: do not fallback to target host as Cassandra peer.service source by @rarguelloF in #2100
- tracer: WithHeaderTags performance improvements by @ajgajg1134 in #2117
- internal: Improve the Iter performance of LockMap on empty maps by @ajgajg1134 in #2127
- contrib/internal/httptrace: improve performance of span starts by @knusbaum in #2128
- contrib/emicklei/go-restful.v3: fix componentName (cherry-pick #2132) by @knusbaum in #2136
- contrib/{internal/httptrace, net/http}: fix memory leak and request closure by @knusbaum in #2138
- contrib/aws/aws-sdk-go-v2: add WithErrorCheck option by @johanneswuerbach in #2042
- tracer/option: Add support for generic metadata in Tracer.SetUser by @kpurdon in #1985
Application Security Management (ASM)
We're happy to release the first version of ASM for Go that no longer requires CGO. This reduces the setup requirements to the bare minimum for Go development: the Go toolchain and nothing more!
Note that even if you disable CGO with CGO_ENABLED=0
, the resulting compiled program will still be dynamically linked against the C library, libm, and libdl. Already existing ASM users are not impacted by this new implementation and can upgrade to this version transparently, as these libraries were already required by the previous implementation using CGO.
This release also includes the ability to configure at run time your HTTP protection behaviour at https://app.datadoghq.com/security/configuration/asm/protection-behaviour
- internal/appsec: remove unnecessary remoteconfig updates specifications by @Hellzy in #2084
- appsec: integrate the new purego-based go-libddwaf by @Julio-Guerra in #2090
- appsec: remotely configurable HTTP protection behaviour by @Hellzy in #2044
Profiling
- contrib/database/sql: properly annotate DB operations with execution trace tasks by @nsrip-dd in #2060
- profiler: Add profiler.enabled tag by @felixge in #2065
- profiler: Reduce execution trace period to 15min by @felixge in #2091
General
- Faster CI: Use Larger Runners by @felixge in #2068
- Faster CI: Optimize APM Parametric Tests by @felixge in #2070
- Faster CI: Optimize System Tests by @felixge in #2071
- all: run go mod tidy by @nsrip-dd in #2073
- Faster CI: Optimize Pull Request Tests by @felixge in #2075
- CI: Simplify System Tests by @felixge in #2079
- Updated instructions for adding a benchmark in contributing.md by @dianashevchenko in #2080
- .gitlab-ci.yml: added BENCHMARK_TARGETS variable by @dianashevchenko in #2081
- system-tests: enable tracing e2e otel scenario by @ahmed-mez in #2083
- ci: update govulncheck to its latest interface by @Julio-Guerra in #2096
New Contributors
- @satorunooshie made their first contribution in #2025
- @mtoffl01 made their first contribution in #1764
- @lsgndln made their first contribution in #2040
- @rangelrealecb made their first contribution in #1224
- @michaelbeaumont made their first contribution in #2088
Full Changelog: v1.52.0...v1.53.0