Releases: DataDog/dd-trace-go
v1.64.1
This patch release brings a fix for a data race in ddtrace/tracer
when applying trace sampling rules and setting tags concurrently.
Full Changelog: v1.64.0...v1.64.1
v1.64.0
Summary
In this release, the tracer adds support for tag-based sampling in sampling rules set via remote configuration. See https://docs.datadoghq.com/tracing/trace_collection/runtime_config/ for more on remote configuration.
Additionally, the tracer now supports matching numeric values via span sampling rules, in addition to string values.
For example, [{"error_code": "4??", "sampling_rate":"0.01"}]
will now match both the integer 403 and
the string `"403". String matches are now case-insensitive.
This release brings several bug fixes to the tracer, contrib packages, and remote configuration.
Changes
Application Performance Monitoring (APM)
- ddtrace/tracer: added support for metrics tag sampling by @dianashevchenko in #2662
- ddtrace/tracer: adding support of tags in remote sampling rules. by @yuanyuanzhao3 in #2676
- ddtrace/tracer: added a WithAgentTimeout option to reduce the test suite duration with no agent by @dianashevchenko in #2661
Fixes
Application Performance Monitoring (APM)
- docs: fix dbStats example in contrib/database/sql by @mtoffl01 in #2669
- contrib/dimfeld/httptreemux.v5: fix route and name for 30X redirects by @darccio in #2685
- contrib/database/sql: Disable DBStats if statsd client initialization fails by @mtoffl01 in #2682
- fix: Don't call
c.Error(...)
inside echotrace middlewares by @nakkamarra in #2609 - {ddtrace/tracer,datastreams}: set default agent TO to 10s by @ahmed-mez in #2655
- internal/remoteconfig: fixes data race when accessing capabilities by @SvenGasterstaedt in #2652
- ddtrace/tracer: fix calculation of
tracestate
length by @bouwkast in #2585 - ddtracer/trace: if tracing disabled don't call agent to get features by @bstncartwright in #2482
- ddtrace/tracer: fix sampling rule override for manual keep by @dianashevchenko in #2666
- internal: Fixing
_dd.p.dm
decision maker collision on number 10. by @yuanyuanzhao3 in #2672 - ddtrace/tracer: remove agent_psr when rule_psr is set by @dianashevchenko in #2668
New Contributors
- @nakkamarra made their first contribution in #2609
- @SvenGasterstaedt made their first contribution in #2652
- @bouwkast made their first contribution in #2585
- @bstncartwright made their first contribution in #2482
Full Changelog: v1.63.1...v1.64.0
v1.63.1
v1.63.0
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)
- Stricter time budget per request by @eliottness in #2613
- Collect edge waf headers by @Julio-Guerra in #2637
- Allow enabling SCA with DD_APPSEC_SCA_ENABLED by @Julio-Guerra in #2634
- contrib/chi.v5: add a response header reader option by @turettn in #2640
Profiling
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
- @samsullivan made their first contribution in #2598
- @adrien-f made their first contribution in #2625
- @dmellonielet made their first contribution in #2644
- @turettn made their first contribution in #2640
Full Changelog: v1.62.0...v1.63.0
v1.62.0
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)
- appsec: fix remote security rules update by @Hellzy in #2568
- appsec: remove byte slices from WAF input by @eliottness in #2591
- appsec: DD_APPSEC_WAF_TIMEOUT default value: 4ms -> 1ms @eliottness in #2591
- contrib/google.golang.org/grpc: security rule passlist support by @Julio-Guerra in #2589
General
- Replace Go version 1.18+1.19 with 1.19+1.22.0 by @ddyurchenko in #2572
Fixes
- contrib/gorm.io/gorm.v1: do not panic on open by @bendiknesbo in #2560
New Contributors
- @mborst made their first contribution in #2558
- @bendiknesbo made their first contribution in #2560
- @tabgok made their first contribution in #2550
- @grantseltzer made their first contribution in #2510
- @yuanyuanzhao3 made their first contribution in #2587
- @nsakharenko made their first contribution in #2583
Full Changelog: v1.61.0...v1.62.0
v1.61.0
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)
- ddtrace/tracer: Switch default context propagation order by @JianyiGao in #2368
- tracing: Adds support for Span Links by @mabdinur in #2502
- ddtrace/tracer: added tracing_enabled option to remote config by @dianashevchenko in #2513
- contrib/labstack/echo.v4: add option to ignore errors by @mrkagelui in #1567
- contrib/jackc/pgx.v5: add pgx support by @renanferr in #2410
- dyngo: dynamically register listeners only if they're needed by @RomainMuller in #2394
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
- appsec: support for go 1.22 by @Julio-Guerra in go-libddwaf#64
- appsec: DataDog's WAF ignore field with
ddwaf:"ignore"
by @eliottness in go-libddwaf#68 - chore: go-libddwaf v2.3.1 by @eliottness (Release Notes)
Profiling
Data Streams Monitoring (DSM)
- [data streams] Track high watermark offsets by @piochelepiotr in #2511
General
- profiler: skip flaky TestExecutionTraceRandom by @nsrip-dd in #2531
- ci/appsec: refresher by @Julio-Guerra in #2537
- internal/namingschema: simplify the namingschema by @knusbaum in #2129
- interna/version: bump version.go to v1.61.0-dev by @katiehockman in #2501
- .github/workflows: fixes apm:ecosystem label for issues and PRs by @katiehockman in #2525
- opentelemetry: refactor span links code for clarity by @katiehockman in #2538
- chore: make the smoke-test workflow usable as go-libddwaf integ test by @RomainMuller in #2546
- chore: fix smoke test workflow_call situation by @RomainMuller in #2547
- chore: make git available in smoke-test docker image by @RomainMuller in #2548
- ci/system-tests: add graphql system tests by @Julio-Guerra in #2554
New Contributors
- @Juneezee made their first contribution in #2437
- @mabdinur made their first contribution in #2502
- @renanferr made their first contribution in #2410
Full Changelog: v1.60.3...v1.61.0
v1.60.3
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
Summary
Removed inet.af/netaddr
dependency after domain removal.
Changes
Fixes
- go.mod: remove inet.af/netaddr dependency #2553 by @darccio @eliottness
Full Changelog: v1.60.1...v1.60.2
v1.60.1
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
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)
- appsec/graphql: add support for Threat Monitoring by @RomainMuller in #2309
- appsec: register
ASM_TRUSTED_IPS
capability to RC by @RomainMuller in #2460
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
- CI: Only mark PRs as stale by @ajgajg1134 in #2423
- readme: Add example for running just one integration container by @ajgajg1134 in #2429
- system-tests: add the uds-echo variant by @Julio-Guerra in #2438
- ci: setup smoke tests by @Julio-Guerra in #2441
- Revert "Update gotraceui to v0.3.0." by @darccio in #2457
- maitenance: new GitHub Triage Badger by @RomainMuller in #2451
- internal/datastreams: Improve performance by @piochelepiotr in #2455
- .github/workflows: adapting last v2 CI changes by @darccio in #2435
- ci: don't send issue body in triager by @nsrip-dd in #2472
- CODEOWNERS: Update for new gh team structure by @felixge in #2477
- Clean parametric tests pipeline by @robertomonteromiguel in #2485
- CODEOWNERS: Reduce go.mod/go.sum related pings by @felixge in #2484
- remoteconfig: fine grained locking by @Hellzy in #2458
- Don't ask for triage of issues from @DataDog/dd-trace-go-guild by @RomainMuller in #2489
- Use PAT to read team member list by @RomainMuller in #2491
- remoteconfig: remove mutex underscore prefixes by @Hellzy in #2497
- .github/workflows: generalize GH workflow for adding apm:ecosystems label by @katiehockman in #2496
- build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 by @dependabot in #2445
- internal/telemetry: export Products field by @katiehockman in #2500
- internal/telemetry: remove DetectLibDl by @katiehockman in #2517
- internal/telemetry: do not send empty container and entity headers by @ahmed-mez in #2506
- go.mod: upgrade purego v0.5.0 => upgrade purego v0.5.2 by @eliottness in #2524
New Contributors
- @AliDatadog made their first contribution in #2402
- @robertomonteromiguel made their first contribution in #2462
- @eyasy1217 made their first contribution in #2228
Full Changelog: v1.59.0...v1.60.0