Skip to content

Releases: DataDog/dd-trace-go

v1.59.0-rc.3

21 Dec 10:19
8ebbf1a
Compare
Choose a tag to compare
v1.59.0-rc.3 Pre-release
Pre-release

What's Changed

This release includes a fix to several library integrations which could have previously caused data races related to start options. This was fixed in database/sql, gin-gonic/gin, go-chi/chi.v5, go-chi/chi, google.golang.org/grpc.v12, google.golang.org/grpc, gorilla/mux, julienschmidt/httprouter, k8s.io/client-go/kubernetes, labstack/echo.v4, labstack/echo, net/http, and urfave/negroni. We recommend you update to this version if you are using any of these integrations.

Application Security Management (ASM) now can be remotely activated by APM Tracing users with Datadog Remote Configuration, without requiring the appsec build tag or DD_APPSEC_ENABLED environment variable. This can be achieved from different places in our UI such as ASM's Service Setup or APM's Service Catalog (hovering the ASM Status column). Non-remote-configuration users still need to deploy their services with the DD_APPSEC_ENABLED opt-in environment variable to enable ASM. Users of CGO_ENABLED=0 will still have to rely on the appsec build tag for now, as it results into a dependency to libdl.so.2 to have on your deployment environment in this precise case, but not when CGO_ENABLED=1.
This release also includes the latest ASM private beta feature, API Security (public documentation still in progress).

Beta: In-app APM library configuration of trace sampling rate, HTTP header tags and custom tags.
This feature has a known bug: deleting the configuration entry in-app won't reset the configuration locally, this will be fixed in the next version of dd-trace-go (v1.60.0).

Application Security Management (ASM)

  • appsec: remove the "appsec" build tag requirement by @RomainMuller in #2354
  • go.mod: go-libddwaf v2.2.2 including major perf improvements and bug fixes by @eliottness in #2417
  • appsec/api-security: http request schema collection and sensitive data scanning by @Hellzy in #2381
  • appsec: support server.response.headers.no_cookies WAF address by @eliottness in #2347

Application Performance Monitoring (APM)

  • contrib/google.golang.org/grpc: improve the memory efficiency of threats detection for grpc by @RomainMuller in #2338
  • contrib: header_tags support on julienschmidt/httprouter by @mtoffl01 in #2331
  • contrib/kafka: take env variable into account to enable DSM by @vandonr in #2353
  • contrib/aws/{aws-sdk-go/aws, aws-sdk-go-v2/aws}: add context example by @mackjmr in #1504
  • contrib/dimfeld/httptreemux.v5: parameterize redirects due to trailing slash by @laughingman-hass in #2332
  • contrib/google.golang.org/grpc: add hostname tag by @rarguelloF in #2361
  • contrib/database/sql: prevent DBM propagation full mode with incompatible dbs by @rarguelloF in #2328
  • contrib: fix span start option races by @eliottness in #2418
  • tracer: Fix race in spanContext.setSamplingPriority by @evanj in #2271
  • tracer: report config-change telemetry in dynamic config by @ahmed-mez in #2350
  • tracer: check for (service,env) matching in dynamic config by @ahmed-mez in #2365
  • ddtrace/opentelemetry,opentracing: fixed the format of telemetry tags by @dianashevchenko in #2367
  • tracer: report rc capabilities for dynamic config by @ahmed-mez in #2369
  • tracer: configure global tags via remote-config by @ahmed-mez in #2378
  • tracer: support dot notation for tags with array values by @katiehockman in #2253
  • build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 by @dependabot in #2373
  • tracer: improve debug message for propagating tag length limit reached by @katiehockman in #2405

General

New Contributors

Full Changelog: v1.58.0...v.1.59.0

v1.58.0

20 Nov 16:27
72732e8
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) makes several changes that will improve the OpenTelemetry experience:

  • The tracer will now generate 128-bit long trace IDs by default. To disable this, set DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED to false.
  • For a distributed trace, the entire tracestate header will be propagated to avoid losing context data from other vendors. This should improve interoperability and migrations when using multiple trace context propagation styles across systems.
  • There are a number of improvements to the OpenTelemetry API provided under ddtrace/opentelemetry:
    • BREAKING CHANGE: The operation name of the span will no longer be derived from the OTel span's name, and will now be crafted using OTel semantics. The OTel span's name will only be used as the resource name. This should provide a more appropriate span name and improve the UX. To explicitly set the span name when using the OTel API, you can set the operation.name attribute on the span.
    • The OTel API will now recognize reserved attributes, and map those to the corresponding properties of a Datadog span. The full list of attributes are here. This is to better match the OTLP behavior.
    • We have embedded a no-op struct in the OTel API implementation so that the OTel API now supports v1.20+, v0.43.0+ of the upstream Go OpenTelemetry API library.

Changes

Application Performance Monitoring (APM)

Application Security Management (ASM)

This release includes important optimizations of ASM Threats Detection by avoiding Go string copies, leading to major savings of memory allocations (note that this internal change is hidden inside the gRPC improvements below but apply to HTTP too which also relies on the same internals).

Datastreams Monitoring

Profiler

New Contributors

Full Changelog: v1.57.0...v1.58.0

v1.57.0

06 Nov 20:52
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) will now correctly honor the trace context propagation style precedence, where previously W3C tracecontext style would always take precedence even when a user specifies it later in the chain. This is a bug fix to align with expected behavior, but could potentially be a breaking change for customers relying on W3C trace context propagation.

Other APM changes include deprecation of the old Gorm libraries (gopkg.in/jinzhu/gorm.v1 and jinzhu/gorm), and fixes for net/http contrib to now honor WithHeaderTags in WrapHandler, the http.route tag to be correctly collected in all relevant libraries.

Changes

Application Performance Monitoring (APM)

  • contrib: implement http.route in missing contribs by @rarguelloF in #2234
  • contrib/(github and gopkg)/gorm: Mark as deprecated by @ajgajg1134 in #2304
  • go.mod: bump github.com/DataDog/datadog-agent/pkg/obfuscate to v0.48.0 by @ahmed-mez in #2256
  • go.mod: bump otelhttp to v0.44.0 by @ahmed-mez in #2274
  • [deps] update datadog-agent version to stable by @ufoot in #2308
  • build(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1 by @dependabot in #2294
  • tracer.startTestTracer: Call SetServiceName("") when stopping by @evanj in #2260
  • tracer: call SetServiceName("") from tests to reset globals by @evanj in #2270
  • ddtrace/tracer: encode span IDs in execution traces efficiently by @nsrip-dd in #2268
  • Add dd-trace-go macrobenchmark to CI pipeline by @igoragoli in #2285
  • remoteconfig: make rc client a singleton by @ahmed-mez in #2297
  • contrib/net/http: honor WithHeaderTags in WrapHandler by @sudolibre in #2288

Application Security Management (ASM)

Profiler

General

  • ci: use older Windows for Go 1.19 tests by @nsrip-dd in #2250
  • workflows: automatically label ecosystems issues and PRs by @katiehockman in #2254
  • build(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 by @dependabot in #2264
  • source-code-integration: Remove credentials from git repository url. by @lraucy in #2296

Fixes

Application Performance Monitoring (APM)

  • tracer: honor tracecontext propagation style precedence by @purple4reina in #2252
  • tracer TestUserMonitoring: Wait for goroutines before test completes by @evanj in #2263
  • tracer TestWithHeaderTags: Clear header tags to work with -count=2 by @evanj in #2262
  • tracer: TestAgentIntegration: Clean up state for -count=2 by @evanj in #2261
  • tracer: Fix TestMalformedTID so it passes on its own by @evanj in #2257

General

  • internal/log: fix potential integer conversion issue from parsed value by @darccio in #2289

New Contributors

Full Changelog: v1.56.1...v1.57.0

v1.56.1

25 Oct 09:05
be314de
Compare
Choose a tag to compare

Summary

A few minor bug fixes in this release: support for gofiber/fiber up to v2.50.0, and a fix for the OpenTelemetry API.

Changes

Fixes

  • [v1.56.1] opentelemetry: finish a span with an error if one is provided by @darccio in #2281
  • [v1.56.1] contrib/gofiber/fiber: upgrade to v2.50.0 and fix breaking change by @darccio in #2280

Full Changelog: v1.56.0...v1.56.1

v1.56.0

18 Oct 07:37
5781af2
Compare
Choose a tag to compare

Summary

In this release, Continuous Profiler enables execution tracing by default for Go 1.21+. The execution tracer is the data source powering our new timeline view for analyzing latency and identifying bottlenecks. The profiler additionally adds a new metric for number of active goroutines, and disables profiling in AWS Lambda.

Additionally, Data Stream Monitoring (DSM) has a new version tag to track deployments.

Finally, some contrib library improvements include support for translating custom errors in labstack/echo.v4, and trace context propagation for libraries built on fasthttp.

This release also includes several bug fixes and documentation improvements:

Changes

Application Performance Monitoring (APM)

  • contrib/labstack/echo.v4: add WithErrorTranslator Option by @mattscamp in #2169

Profiling

General

New Contributors

Full Changelog: v1.55.0...v1.56.0

v1.55.0

15 Sep 14:39
ca35463
Compare
Choose a tag to compare

Summary

With the release of Go 1.21, this dd-trace-go release drops support for Go version 1.18 and older, following our Go support policy. This minimum supported Go version for this library is now Go 1.19.

This release adds the contrib/IBM/sarama package to support for tracing the IBM/sarama Kafka library.

The Data Streams Monitoring Go library has been incorporated into this library. The feature can be enabled by setting the DD_DATA_STREAMS_ENABLED environment variable to true.

This release introduces a debug mode for the tracer to help identify long-lived or abandoned spans, which can lead to increased memory usage. It can be enabled with the WithDebugSpansMode tracer option or by setting environment variable DD_TRACE_DEBUG_ABANDONED_SPANS =true.

This release also includes several bug fixes and performance improvements:

  • Fix a bug in contrib/database/sql which incorrectly cached contexts.
  • Resolve a data race in contrib/net/http.
  • Reduce the memory allocated during initialization of the contrib/google.golang.org/api package.
  • Improve the latency of W3C traceparent header validation.

Changes

General

Application Performance Monitoring (APM)

  • contrib/IBM/sarama: adds trace for IBM/sarama by @rodrigoff in #2142
  • tracer: ease configuring client-side stats computation by @ahmed-mez in #2168
  • contrib/database/sql: use correct context for trace tasks in statements by @nsrip-dd in #2173
  • ddtrace/tracer: fix inaccurate telemetry 'stats_computation_enabled' by @ahmed-mez in #2170
  • tracer: add test for logging 128-bit trace ids when upper bits are empty by @katiehockman in #2101
  • tracer: only set drop priority on whole trace by @ajgajg1134 in #2176
  • ddtrace/tracer: create debug mode for old, open spans by @hannahkm in #2149
  • [textmap] Replace validID regex with ascii comparisons by @thieman in #2180
  • tracer: add service naming and peer service configurations to payload by @wconti27 in #2177
  • Revert "ddtrace/tracer: create debug mode for old, open spans" by @ajgajg1134 in #2183
  • ddtrace/tracer: add abandoned spans debugger by @darccio in #2188
  • contrib/google.golang.org/grpc: stop using deprecated packages by @rarguelloF in #1959
  • ddtrace/tracer: fix race condition in abandonedspans_test.go by @darccio in #2195
  • contrib/google.golang.org/grpc: fix gen_proto.sh script by @rarguelloF in #2196
  • ddtrace/tracer: fix race condition with RecordLogger in abandonedspans_test.go by @darccio in #2198
  • tracer: add orchestrion telemetry by @ahmed-mez in #2200
  • ddtrace/tracer: add _dd.base_service tag by @rarguelloF in #2175
  • ddtrace/tracer: add orchestrion to startup logs by @ahmed-mez in #2205
  • ddtrace/tracer: clean orchestrion startup logs by @ahmed-mez in #2206
  • contrib/net/http: Copy span options and resource name to avoid data race by @ajgajg1134 in #2204
  • contrib/google.golang.org/api: lazy init regexp by @felixge in #2197

Continous Profiler

  • profiler: upgrade gostackparse to support Go 1.21 tracebacks by @nsrip-dd in #2150

New Contributors

Full Changelog: v1.54.1...v1.55.0

v1.54.1

07 Sep 14:16
7b683ad
Compare
Choose a tag to compare

Summary

A few minor bug fixes in this release, namely resolving #2172 which could cause traced tasks in statements to be erroneously cancelled and resolving a data race in our net/http contribution.

Fixes

  • contrib/database/sql: use correct context for trace tasks in statements by @ajgajg1134 in #2202
  • contrib/net/http: Copy span options and resource name to avoid data race (#2204) by @ajgajg1134 in #2207

Full Changelog: v1.54.0...v1.54.1

v1.54.0

10 Aug 13:34
09f3db3
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) adds partial flushing beta support, it enables flushing of partially finished traces. Partial flushing is disabled by default, it can be enabled via WithPartialFlushing or by setting DD_TRACE_PARTIAL_FLUSH_ENABLED to true. See the docs for more details.

The release also includes multiple bug fixes and improvements.

Changes

Application Performance Monitoring (APM)

  • contrib/bradfitz/gomemcache: Add trace wrappers for new Append and Prepend client functions by @vanstinator in #1555
  • contrib/segmentio/kafka.go.v0: only log on inject error by @doron-cohen in #2126

General

New Contributors

Full Changelog: v1.53.0...v1.54.0

v1.53.0

31 Jul 20:05
5b4682b
Compare
Choose a tag to compare

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

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

New Contributors

Full Changelog: v1.52.0...v1.53.0

v1.52.0

22 Jun 16:08
Compare
Choose a tag to compare

What's Changed

Application Security Management (ASM) updated its default blocking page templates to get rid of UTF-8 characters (HTML) and minify the content (JSON). The security rules have also been updated to the latest version, which introduces a new rule type for rules related to specific security scanners.

Application Performance Monitoring (APM) adds several new features, including support for confluent-kafka-go/v2/kafka, a WithResourceNamer option in contrib/go-chi/chi.v5, and support for the sql comment extract implementation. It also contains a few fixes, including introducing a fallback to dynamic service names if no global is found in contrib/google.golang.org/grpc, and removes the restriction requiring a call to Register before Open in contrib/database/sql.

Application Performance Monitoring (APM)

  • ddtrace/tracer: sql comment extract implementation by @barbinimichael in #1964
  • ddtrace/opentelemetry: Enabled OTel benchmark in CI by @dianashevchenko in #1970
  • contrib/google.golang.org/api: update google.golang.org/api version by @rarguelloF in #1971
  • contrib: add support for confluent-kafka-go/v2/kafka by @dferstay in #1889
  • contrib: peer.service precursors for confluentinc kafka integrations by @zarirhamza in #2008
  • contrib/google.golang.org/api: change gen_endpoints script to generate a json file by @rarguelloF in #2009
  • contrib: GRPC peer.service precursor tags by @zarirhamza in #1994
  • contrib: mongoDB peer.service precursor tags by @zarirhamza in #1996
  • contrib/hashicorp/* peer.service precursor tags by @zarirhamza in #1998
  • contrib/globalsign/mgo: Precursor Fix by @zarirhamza in #2011
  • contrib/go-chi: customize span resource name for go-chi by @opsengine in #1950
  • contrib/net/http: add host and port tags for roundTripper by @rarguelloF in #2016
  • contrib/database/sql: do not require users to Register before Open by @knusbaum in #2022
  • contrib/go-chi/chi.v5: add WithResourceNamer option by @taowata in #2024
  • contrib/google.golang.org/grpc: Fallback to dynamic service names if no global is found by @ajgajg1134 in #2048

Application Security Management (ASM)

  • internal/appsec: use latest HTML/JSON blocked response template by @Hellzy in #1952
  • internal/appsec: security rules v1.7.1 by @Hellzy in #2000

Profiling

  • profiler: remove old delta implementation by @nsrip-dd in #1860
  • profiler: add tag to indicate whether execution tracing is enabled by @nsrip-dd in #1997

General

  • go.mod: fix opentelemetry dependency issue by @knusbaum in #2005
  • ci: use reviewdog and use gci linter for imports instead of goimports by @rarguelloF in #2010
  • internal/gitmetadata: log failed read build info as debug by @ahmed-mez in #2012
  • internal/dockerfiles: Follow dockerfile security best practices by @ajgajg1134 in #1973
  • build(deps): bump github.com/gin-gonic/gin from 1.7.7 to 1.9.1 by @dependabot in #2017
  • go.mod: update datadog-agent/pkg/remoteconfig/state by @Hellzy in #2032
  • tracer: fix telemetry metrics to align with spec (#2049) by @katiehockman in #2052

New Contributors

Full Changelog: v1.51.0...v1.52.0