Skip to content

Releases: DataDog/dd-trace-go

v1.63.1

29 Apr 14:55
854bec0
Compare
Choose a tag to compare

Summary

Fixed _dd.p.dm decision maker collision on number 10.

Changes

Fixes

  • [v1.63.1] internal: Fixing _dd.p.dm decision maker collision on number 10 by @darccio in #2673

Full Changelog: v1.63.0...v1.63.1

v1.63.0

22 Apr 15:44
ef74ecf
Compare
Choose a tag to compare

What's Changed

Application Performance Monitoring (APM)

Summary: database/sql integration allows to send DB stats metrics with WithDBStats, new options added to 99designs/gqlgen and segmentio/kafka.go, and google.golang.org/grpc.v12 compilation errors fixed. Also introduces support for remote sampling rules consistent with the current implementation, except sampling by tags.

  • ddtrace/tracer: populate and propagate remote rules decision maker by @yuanyuanzhao3 in #2643
  • ddtrace/tracer: support for remote sampling rules by @yuanyuanzhao3 in #2596
  • contrib/99designs/gqlgen: add WithCustomTag option by @samsullivan in #2598
  • contrib/database/sql: implementation of DB Stats feature with unique statsd client by @mtoffl01 in #2629
  • contrib/database/sql: use tracer-level tags on contrib's statsd.Client by @mtoffl01 in #2635
  • contrib/google.golang.org/grpc.v12: replace missing {From,New}Context with equivalent functions by @darccio in #2624
  • contrib/segmentio/kafka.go.v0: add DSM support by @adrien-f in #2625

Application Security Management (ASM)

Profiling

  • profiler/internal/fastdelta: remove Go 1.18 + windows fuzz test workaround by @nsrip-dd in #2639

General

  • go.mod: rotate go 1.19 from supported versions by @eliottness in #2617
  • internal: remove pre-Go 1.18 workaround for reading build info by @nsrip-dd in #2638

Fixes

Application Performance Monitoring (APM)

  • internal/remoteconfig/: Fixes capability APM_TRACING_SAMPLING_RULES to use the correct reserved number 29. by @yuanyuanzhao3 in #2620
  • internal/samplernames: fixes a colliding sampler name by @yuanyuanzhao3 in #2627

Application Security Management (ASM)

  • Handle bad redirect action parameters by @Hellzy in #2604
  • Make redirect actions blocking by @Hellzy in #2628
  • Don't enable blocking-related RC features when using local security rules by @Hellzy in #2626

New Contributors

Full Changelog: v1.62.0...v1.63.0

v1.62.0

22 Mar 09:16
a5a2d52
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) improves header tag normalization, expands support for dynamic instrumentation

Application Security Management (ASM) adds support for passlist security events on gRPC.

What's Changed

Application Performance Monitoring (APM)

  • [DSM] Close span on produce error in ckgo by @mborst in #2558
  • contrib/database/sql: add in ddh, dddb propagation by @tabgok in #2550
  • contrib/google.golang.org/grpc: fix flaky tests by removing arbitrary sleeps by @Julio-Guerra in #2584
  • contrib/gofiber/fiber.v2: add possibility to exclude spans generation for specific requests by @nsakharenko in #2583
  • ddtrace/tracer: added UnmarshalJSON method to sampling rules by @dianashevchenko in #2563
  • tracer/remote-config: Subscribe to dynamic instrumentation configs via remote config by @grantseltzer in #2510
  • ddtrace/tracer: go tracer tests lint. by @yuanyuanzhao3 in #2587
  • statsdtest: Move mock statsd client for testing into its own package by @mtoffl01 in #2564
  • normalizer: expand "header tag" normalization by @mtoffl01 in #2549

Application Security Management (ASM)

General

Fixes

New Contributors

Full Changelog: v1.61.0...v1.62.0

v1.61.0

04 Mar 06:20
db368a5
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) adds support for Span Links (a highly requested feature!). This feature is currently supported within Datadog's OpenTelemetry API implementation.

The default trace context propagation order, which is used for traces in distributed workflows, will become datadog,tracecontext (previously it was tracecontext,datadog). This is not a breaking change, and customers should not experience any negative changes in behavior. If you experience any issues, please reach out to Datadog support.

Other APM features include out-of-the-box library integration support for github.com/jackc/pgx/v5 and the ability to ignore specific error types in the github.com/labstack/echo/v4 integration.

Changes

Application Performance Monitoring (APM)

Application Security Management (ASM)

ASM Customers upgrading to Go 1.22 should upgrade dd-trace-go or at least upgrade github.com/DataDog/go-libddwaf to version v2.3.1. Otherwise ASM Threats won't start with the following error:

appsec: threats detection cannot be enabled for the following reasons: 1 error occurred:
	* unsupported Go version: go1.22.0

Profiling

Data Streams Monitoring (DSM)

General

New Contributors

Full Changelog: v1.60.3...v1.61.0

v1.60.3

13 Feb 15:38
0dbd562
Compare
Choose a tag to compare

Fix the version number reported by dd-trace-go to avoid the release candidate label.

Full Changelog: v1.60.2...v1.60.3

v1.60.2

13 Feb 15:25
96ecc73
Compare
Choose a tag to compare

Summary

Removed inet.af/netaddr dependency after domain removal.

Changes

Fixes

Full Changelog: v1.60.1...v1.60.2

v1.60.1

07 Feb 10:25
6acc14d
Compare
Choose a tag to compare

Summary

A few minor bug fixes in this release.

Changes

Fixes

  • ddtrace/opentelemetry: add RWMutex to handle concurrent calls to setters by @darccio in #2521
  • tracer: verify that hostname reporting is honored regardless of stats calculation by @katiehockman #2533

Full Changelog: v1.60.0...v1.60.1

v1.60.0

30 Jan 18:21
Compare
Choose a tag to compare

Summary

In this release, Application Performance Monitoring (APM) adds tracing instrumentation support for valyala/fasthttp. This release also fixes a bug with beta-level remote configuration of the tracer, ensuring that config deletion triggers reverting the configuration option to its original value. Startup logs will also be expanded to describe configured feature flags.

This release also adds Beta support for resource-based and tag-based sampling. This can be configured using the new trace SamplingRule called TagResourceRule or by setting "resource" or "tags" in the trace sampling rules JSON, e.g. DD_TRACE_SAMPLING_RULES=[{"service": "test.?", "resource": "ec2.*", "tags": {"aws.operation":"DescribeInstances"}, "sample_rate": 1.0}]

Application Security Management (ASM) adds support for Threat Monitoring on GraphQL operations, and trusted IPs can now be added to your ASM passlist.

The Profiler add the WithCustomProfilerLabelKeys API, which enables using profiler labels as attributes to filter flame graphs in the Continuous Profiler UI. The Profiler also improves execution trace coverage over time for apps which are deployed simultaneously across several instances, by randomizing when execution traces are collected. An execution trace is collected on average once every 15 minutes by default, but the time between execution traces is now randomized.

Changes

Application Performance Monitoring (APM)

  • contrib/valyala/fasthttp.v1: add a fasthttp integration to ddtrace by @mtoffl01 in #2305
  • contrib/google.golang.org/grpc: add error details to span tags by @eyasy1217 in #2228
  • Send the Datadog-Entity-ID header, containing either the container-id or the cgroup inode if available by @AliDatadog in #2402
  • Fix build on linux and do not send cgroup node inode if in host cgroup namespace by @AliDatadog in #2453
  • ddtracer/tracer: fix flaky TestReportHealthMetrics on Windows by @darccio in #2439
  • Configure parametric test to get the golang tracer in same way as system-tests by @robertomonteromiguel in #2462
  • ddtrace/tracer: only listen on localhost in TestTransportResponse by @nsrip-dd in #2463
  • ddtrace/tracer: clear global headers in remote config tests by @nsrip-dd in #2466
  • ddtrace/tracer: adding sampling by resource and tags by @dianashevchenko in #2448
  • tracer: fix example and add SamplingRule function tests by @katiehockman in #2493
  • tracer/log: Add feature flags to startup logs by @ajgajg1134 in #2495
  • tracer: handle rc deletion in dynamic config by @ahmed-mez in #2468

Application Security Management (ASM)

Profiling

  • profiler: randomize when execution traces are collected by @nsrip-dd in #2401
  • profiler: deduplicate test profiler setup logic by @nsrip-dd in #2428
  • Update gotraceui to v0.3.0. by @darccio in #2443
  • profiler: support using custom profiler labels in our UI by @nsrip-dd in #2282
  • profiler/internal/pprofutils: work around breaking pprof change by @nsrip-dd in #2515

General

New Contributors

Full Changelog: v1.59.0...v1.60.0

v1.59.1

24 Jan 09:18
Compare
Choose a tag to compare

Patch Release Notes

Application Security Management (ASM)

  • Upgrade github.com/ebitengine/purego: v0.5.0 -> v0.5.2 to forward ebitengine/purego#189 fix to upstream

⚠️ If you are encoutering the following error (#2504), please upgrade to v1.59.1:

dlopen: unhandled relocation for purego_dlopen (type 46 (SDYNIMPORT) rtype 7 (R_CALL))
dlsym: unhandled relocation for purego_dlsym (type 46 (SDYNIMPORT) rtype 7 (R_CALL))
dlerror: unhandled relocation for purego_dlerror (type 46 (SDYNIMPORT) rtype 7 (R_CALL))
dlclose: unhandled relocation for purego_dlclose (type 46 (SDYNIMPORT) rtype 7 (R_CALL))

This bug can appear for all users of ASM (using the build tag appsec) starting from v1.53.0 and for all users of dd-trace-go starting from v1.59.0.

v1.59.0

09 Jan 12:43
6a8996f
Compare
Choose a tag to compare

Highlights

Important Information

⚠️ Starting with this release, dd-trace-go requires libdl.so.21 and libm.so.6 to be present in the deployment environment (except Windows, where Application Security Management is not supported). This should be the case for the vast majority of environments (e.g: Redhat, Debian, Alpine, Amazon Linux, Ubuntu) but might not be the case in some minimal-footprint environments (e.g: BusyBox, docker images from scratch). In situations when these requirements aren't met, you might see errors similar to (the exact error may be slightly different depending on the platform):

  • If ld.so is missing (the environment is unable to load dynamic executables) or is not the expected flavor (the binary was built on one platform, and runs on another which uses a different interpreter):
    exec /path/to/binary: no such file or directory
    
  • When one of the required shared libraries is missing (libdl.so.2 in this example):
    /path/to/binary: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
    

If this happens, please create a GitHub issue so we can reconsider this new default requirement. In the meantime, you can work around the problem by adding the datadog.no_waf build tag (go build -tags='datadog.no_waf' ...), which completely disables all Application Security Management features and removes these new requirements.

Application Security Management (ASM) Remote Activation

Application Security Management (ASM) can now be remotely activated by APM Tracing users via Datadog Remote Configuration, granted that the application was built either:

  • with CGO enabled;
  • with CGO_ENABLED=0 and with the appsec build tag (this setup already required libdl.so.21 and libm.so.6 to be present in the deployment environment on previous releases — this remains true).

Remote activation can be performed from different places in Datadog UI, such as ASM's Service Setup or APM's Service Catalog (hovering the ASM Status column).

ASM features can still be enabled locally using the DD_APPSEC_ENABLED=1 environment variable.

Setting the datadog.no_waf build tag completely disables all ASM features, removing the ability for local as well as remote activation.

Application Performance Monitoring (APM)

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.

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).

What's Changed

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

  1. In some build environments, libdl functionality is provided by libc; the ldd <binary> command can be used to determine the exact runtime requirements 2