Releases: DataDog/dd-trace-go
v1.51.0
contrib/google.golang.org/grpc
. Please upgrade to v1.52.0 if you're experiencing issues.
What's Changed
Application Performance Monitoring (APM) fixes a few minor OpenTelemetry-related bugs with W3C trace context propagation, 128 bit trace ids propagation, and the use of the Datadog OTel API. There are also bug fixes in contrib/database/sql
, contrib/go-redis/redis.v8
, and contrib/gomodule/redigo
. It also improves span and service naming across several library integrations. Note that this release adds a deprecation notice to contrib/labstack/echo
.
There are also several new features, including support for the redis/go-redis.v9
tracing integration and a new WithErrorCheck
option in contrib/aws/aws-sdk-go
.
Application Security Management (ASM) now allows users to configure their own custom security rules. These custom security rules get added to the list of security rules used by the In-App WAF. This release also includes a couple of bug fixes.
General
- go.mod: github.com/DataDog/datadog-agent/pkg/obfuscate 7.45.0-rc.1 by @johanneswuerbach in #1916
Application Performance Monitoring (APM)
- ddtrace/tracer: don't set empty tracestate propagation tag by @ahmed-mez in #1910
- ddtrace/{opentelemetry,opentracer}: add telemetry by @ahmed-mez in #1909
- internal/telemetry: track tracer init time metric by @lievan in #1896
- ddtrace/tracer: reset decision maker during fallback behavior of w3c header extraction by @ahmed-mez in #1933
- ddtrace/tracer: ensure access to trace tags is concurrency-safe by @knusbaum in #1948
- ddtrace/tracer: mark context updated when SetUser is called by @knusbaum in #1949
- Set keyTraceID128 on first span in the chunk only by @dianashevchenko in #1946
- ddtrace/opentelemetry: parent start span options shouldn't be propagated and used during child span creation by @dianashevchenko in #1958
- contrib/mongodb: use naming schema by @rarguelloF in #1908
- contrib/syndtr/goleveldb/leveldb: use naming schema by @rarguelloF in #1914
- contrib/tidwall/buntdb: use naming schema by @rarguelloF in #1913
- contrib/cassandra: use naming schema by @rarguelloF in #1911
- contrib/redis: use naming schema by @rarguelloF in #1906
- contrib/kafka: refactor tests by @rarguelloF in #1907
- contrib/google.golang.org/grpc: use naming schema by @rarguelloF in #1919
- contrib/twitchtv/twirp: use naming schema by @rarguelloF in #1920
- contrib/http: use naming schema by @rarguelloF in #1929
- contrib/redis/go-redis.v9: support v9 by @taowata in #1730
- contrib/net/http: don't set empty string values as span tags by @knusbaum in #1956
- contrib/internal/httptrace: remove naming schema from init by @rarguelloF in #1960
- contrib/graphql: use naming schema by @rarguelloF in #1926
- contrib/database/sql: fix bug where options were always overwritten by register options by @rarguelloF in #1904
- contrib/aws: use naming schema by @rarguelloF in #1931
- contrib/cloud.google.com/go/pubsub.v1: use naming schema by @rarguelloF in #1937
- contrib/labstack/echo: Add warning and deprecation notice by @ajgajg1134 in #1974
- contrib/gomodule/redigo: don't ignore the context given as first argument (#1935) by @lbcjbb in #1936
- contrib/aws/aws-sdk-go: add WithErrorCheck option by @delca85 in #1682
- contrib/go-redis/redis.v8: fix broken parsing of redis commands by @knusbaum in #1783
- contrib:
peer.service
precursors for elasticsearch integrations by @zarirhamza in #1981 - contrib:
peer.service
precursors for confluentinc/segmentio integrations by @zarirhamza in #1979 - contrib/aws/aws-sdk-go-v2: add aws_service, region, and resourcename by @zARODz11z in #1888
- internal/telemetry: trim the dependencies version prefix v by @Julio-Guerra in #1963
Application Security Management (ASM)
- internal/appsec: handle user custom rules through remote config by @Hellzy in #1961
- internal/appsec: fix user ID event detection & other appsec tests by @Hellzy in #1918
- internal/appsec/remoteconfig: fix rules overrides by @Julio-Guerra in #1921
- internal/appsec: do not ignore the appsec events rate limiter by @Julio-Guerra in #1927
- internal/appsec: security rules v1.7.0 by @Hellzy in #1983
- contrib/gin-gonic: abort context when the request is blocked by appsec by @Hellzy in #1976
Profiling
- ddtrace/trace: only tag fully-covered spans as execution traced by @nsrip-dd in #1943
- profiler: support reconfiguring execution tracing at runtime by @nsrip-dd in #1978
New Contributors
- @taowata made their first contribution in #1730
- @delca85 made their first contribution in #1682
- @zARODz11z made their first contribution in #1888
Full Changelog: v1.50.1...v1.51.0
v1.50.1
What's Changed
Full Changelog: v1.50.0...v1.50.1
v1.50.0
Summary
Application Security Management (ASM) now provides an In-App WAF (Web Application Firewall) which allows you to block suspicious HTTP requests based on your security rules. The main difference with a classic WAF comes from the fact we leverage the full run-time application context and not only the raw wire-format HTTP protocol payloads (eg. the actual Go values parsed from the raw HTTP request). This release also allows you to remotely configure your ASM configuration on the fly, without redeploying your Go services. This makes it possible to customize the In-App WAF rules to apply to each of your services and configure them in blocking mode. You can read more about our new In-App WAF feature in our documentation, and check out the new In-App WAF configuration page.
Application Performance Monitoring (APM) has added several new larger features: support for 128-bit trace IDs, as well as an Open Telemetry compatible tracer provider API. Note this wrapper is a "beta" feature, it may contain bugs and is not recommended for production use yet.
Changes
Breaking changes
- bump k8s.io/client-go from v0.17.0 to v0.23.17 by @ahmed-mez in #1886
General
- go.mod: upgrade gorm.io/driver/postgres to resolve downstream vuln by @ajgajg1134 in #1865
- contrib: upgrade labstack/echo/v4 from v4.2.0 to v4.9.0 by @ahmed-mez in #1891
- contrib: upgrade emicklei/go-restful to v2.16.0 by @ahmed-mez in #1885
- internal/telemetry: collect telemetry info for gorilla/mux integration by @lievan in #1861
Application Performance Monitoring (APM)
- tracer: support 128-bit trace ids by @katiehockman in #1833
- tracer/option: Add envvar DD_CLIENT_HOSTNAME_ENABLED to config client hostname detection by @ajgajg1134 in #1857
- tracer: add debug log for finished spans by @ahmed-mez in #1877
- tracer: merge support for OTel API by @dianashevchenko in #1839
- contrib/go-redis: add redis db index tag by @rarguelloF in #1755
- contrib/kafka: use naming schema by @rarguelloF in #1827
- contrib: implement mandatory rpc tags by @rarguelloF in #1768
- contrib: load telemetry info for all integrations by @lievan in #1882
- contrib/hashicorp/consul: use naming schema by @rarguelloF in #1821
- contrib/hashicorp/vault: use naming schema by @rarguelloF in #1868
- contrib/database/sql: add WithIgnoreQueryTypes option by @daisuzu in #1823
- contrib/database/sql: use naming schema by @rarguelloF in #1895
- contrib/go-redis/redis.v8: Add example for ClusterClient by @ajgajg1134 in #1864
- contrib/google.golang.org/grpc: Add WithMetadataTags & WithRequestTags to stream interceptor by @radykal-com in #1632
- contrib/gorm.io/gorm.v1: add tracing of raw queries by @NicklasWallgren in #1593
- contrib/elasticsearch: use naming schema by @rarguelloF in #1897
- contrib/bradfitz/gomemcache/memcache: use naming schema by @rarguelloF in #1820
- internal/gitmetadata: Log unknown VCS as debug to reduce confusion by @ajgajg1134 in #1875
- internal/namingschema: add package for selecting and working with the naming schema by @rarguelloF in #1819
Application Security Management (ASM)
- appsec: add blocking SDK body operation (#1901) by @eliottness in #1917
- appsec: suspicious request blocking by @Hellzy in #1797
- internal/appsec: add server.request.method address by @eliottness in #1893
- internal/appsec: update security rules to v1.6.0 by @Julio-Guerra in #1862
- internal/appsec/dyngo: atomic instrumentation swapping by @Julio-Guerra in #1873
New Contributors
- @radykal-com made their first contribution in #1632
- @NicklasWallgren made their first contribution in #1593
- @zekth made their first contribution in #1890
- @daisuzu made their first contribution in #1823
Full Changelog: v1.49.1...v1.50.0
v1.49.1
What's Changed
- contrib/google.golang.org/grpc: Add WithMetadataTags & WithRequestTags to grpc server stream interceptor. It differs with the unary interceptor implementation only in the span the data is added to. Thanks @radykal-com for the contribution!
Full Changelog: v1.49.0...v1.49.1
v1.49.0
Summary
Application Performance Monitoring (APM) ships various new features and bug fixes such as support for elastic/go-elasticsearch/v8
and for dimfeld/httptreemux/v5
. Additional features include new tags for mssql
in database/sql
, and new tags for mgo
. This release also includes a bug fix to how baggage is propagated when using W3C trace context injection/extraction.
Application Security Monitoring (ASM) adds support for multiple IP-related HTTP headers as well as fixing HTTP status code reporting for blocked users in labstack/echo.
Telemetry information is now enabled by default, to disable set DD_INSTRUMENTATION_TELEMETRY_ENABLED
to false
. Additional information can be found here.
Breaking Changes
- Fix returned OS name on Linux by @albertvaka in #1791
This change fixes our lookup of OS name in linux systems that is used for our startup logging. If you are parsing those startup logs and relying on the value of os_name
you may experience a breaking change as the value may shift from "Linux (Unknown Distribution)" to the now correctly identified OS name.
The PprofDiff function is deprecated and will be removed from the profiler package in the next release.
Changes
General
- .github/workflows: integrate APM E2E tests in Github Actions CI by @lambrospetrou in #1784
Application Performance Monitoring (APM)
- contrib/database/sql: add mssql instance name tag by @rarguelloF in #1731
- contrib/globalsign/mgo: add mongodb collection tag by @rarguelloF in #1725
- contrib/elastic/go-elasticsearch: Add support for elasticsearch v8 (Follow-up) by @VJean in #1763
- tracer: small refactor for SQL tracing by @katiehockman in #1777
- database/sql: Export TracedConn, as we need it when using the db.Conn Raw() API call. by @samsm in #1779
- contrib/google.golang.org/{grpc, grpc.v12}: add support for WithSpanOptions by @mackjmr in #1159
- internal/telemetry: enable instrumentation telemetry in the tracer and profiler by @lievan in #1769
- contrib/julienschmidt/httprouter: add http.route tag to span by @asdftamir in #1795
- contrib/dimfeld/httptreemux/v5: add support for httptreemux by @devillexio in #1546
- contrib/net/http: errCheck function by @johanneswuerbach in #1716
Application Security Management (ASM)
- httpsec: handle client ip with multiple HTTP headers by @Julio-Guerra in #1796
- internal/appsec: update security rules to v1.6.0 (#1863)
Profiling
- profiler: increase timestamp precision by @felixge in #1689
- profiler: record timestamp at the start execution tracing by @nsrip-dd in #1766
- profiler: deprecate PprofDiff by @nsrip-dd in #1806
Fixes & Improvements
General
- go.mod: upgrade golang.org/x/net by @katiehockman in #1747
- internal/hostname: Add tracer side hostname detection by @ajgajg1134 in #1712 This can be disabled by setting DD_CLIENT_HOSTNAME_ENABLED to false
- go.mod: Bump deps that used otel to not need v0 of otel by @ajgajg1134 in #1787
- .gitlab/scripts: add more benchmarks to benchmarking platform by @lievan in #1672
- profiler: document/test that Start restarts the profiler by @nsrip-dd in #1805
- ci: run pull request workflows for merge groups by @nsrip-dd in #1809
- internal/log: allow RecordLogger to ignore certain logs by @lievan in #1810
- go.mod: upgrade datadog-agent/pkg/obfuscate by @felixge in #1774
- ddtrace/tracer: fix a race condition on
span.SetUser
by @pobo380 in #1564
Application Performance Monitoring (APM)
- contrib/database/sql: Fix sample code in document to prevent panic on OpenDB by @tsbkw in #1635
- ddtrace/tracer/textmap: always extract baggage when using w3c for compatability by @ajgajg1134 in #1759
- ddtrace/tracer: fix traceparent length check by @ahmed-mez in #1815
Application Security Monitoring (ASM)
New Contributors 🎉
- @VJean made their first contribution in #1763
- @samsm made their first contribution in #1779
- @lambrospetrou made their first contribution in #1784
- @albertvaka made their first contribution in #1791
- @tsbkw made their first contribution in #1635
- @johanneswuerbach made their first contribution in #1716
- @asdftamir made their first contribution in #1795
- @devillexio made their first contribution in #1546
- @pobo380 made their first contribution in #1564
Full Changelog: v1.48.0...v1.49.0
v1.48.0
Summary
In this release, dd-trace-go moves from go 1.17 to go 1.18 as the lowest supported Go version.
Application Performance Monitoring (APM) ships various new features, bug fixes, and hardening measures, such as the addition of new tags for database and messaging integrations, middleware registration changes for the Gin example, and the addition of fuzzing and benchmarking for injection and extraction in the tracer. It also includes bug fixes for W3C trace context propagation and better error handling and retry functionality. Other changes include the ability to modify resource names in the Go-Chi integration, tag spans when execution trace is enabled, and more.
Application Security Management (ASM) introduces authenticated user blocking thanks to its new public appsec.SetUser()
API, allowing to block requests based on the authenticated user ID. This change also affects the previously released user login events, where appsec.TrackUserLoginSuccessEvent()
is now also able to block the given user.
Changes
General
- README: Clarify Legacy Go Compilation Guarantees by @felixge in #1721
- all: Move to 1.18 for lowest supported version by @ajgajg1134 in #1709
- sci: add git metadata from artifacts support by @sashacmc in #1646
Application Performance Monitoring (APM)
- contrib/go-chi/chi.v5: add an option to modify the resource name by @kpurdon in #1615
- contrib: add db.system tag for all db integrations by @rarguelloF in #1711
- contrib: adds 'messaging.system' tag by @zhamza99 in #1697
- ddtrace/tracer: Add fuzzing and benchmarking for injection and extraction by @lievan in #1704
- ddtrace/tracer: add usr.id span tag even with propagation by @Julio-Guerra in #1702
- ddtrace/tracer: enable trace writer to optionally retry on failure. by @purple4reina in #1636
- ddtrace/tracer: replace Windows path characters in fake UDS host by @nsrip-dd in #1713
- ddtrace/tracer: update origin substitution in composeTracestate by @lievan in #1694
Application Security Management (ASM)
- internal/appsec: request blocking based on user ID by @Hellzy in #1706
- internal/appsec: update security rules to v1.5.1 by @Hellzy in #1750
Fixes & Improvements
General
- internal/telemetry: uniformize language name with other ways it's reported by @paullegranddc in #1692
Application Performance Monitoring (APM)
- Rename partition tag from kafka integrations to follow unified naming conventions by @rarguelloF in #1684
- contrib/gin-gonic/gin/example: middleware must be registered before registering routes by @maxday in #1698
- contrib/miekg/dns: fix span kind for dns server traces by @rarguelloF in #1696
- contrib/net/http: Add an example for wrap client by @ajgajg1134 in #1695
- ddtrace/tracer: fix UDS/http url configuration and error messages by @knusbaum in #1604
- ddtrace/tracer/textmap: always extract baggage when using w3c for compatability by @ajgajg1134 in #1759
- tracer: small refactor for single span sampling by @katiehockman in #1718
Application Security Monitoring (ASM)
- contrib/echo: fix status code reporting when blocking users by @Hellzy in #1757
- contrib/echo: wrap appsec error in echo.HTTPError by @Hellzy in #1744
- contrib: stop caching appsec.Enabled() value for gin/echo by @Hellzy in #1732
New Contributors 🎉
- @paullegranddc made their first contribution in #1692
- @sashacmc made their first contribution in #1646
- @kpurdon made their first contribution in #1615
- @purple4reina made their first contribution in #1636
Full Changelog: v1.47.0...v1.48.0
v1.47.0
Summary
In this release, Application Performance Monitoring (APM) adds W3C trace context propagation support. The new default propagation list is tracecontext,Datadog
for injection and extraction. See the docs for more configuration details.
APM also re-introduces the collection of client ip address as an opt-in feature, even when ASM isn't configured. This can be enabled by setting DD_TRACE_CLIENT_IP_ENABLED
.
Application Security Management (ASM) introduces IP blocking to Gin and Echo, along with a new public API to log security-related events.
The profiler now uses the faster delta profile implementation by default, first introduced in version 1.44.0. This significantly reduces the memory allocations from profile manipulation.
Changes
Application Performance Monitoring (APM)
- ddtrace/tracer: add W3C context propagator support by @dianashevchenko in #1630
- ddtrace/tracer : allowed equals sign in propagated tag values by @dianashevchenko in #1650
- ddtrace/tracer: remove some networking from unit tests by @nsrip-dd in #1656
- contrib/bradfitz/gomemcache/memcache: bump client TO in tests by @ahmed-mez in #1673
- tracer: enable stats flushing when Flush() is called by @lievan in #1661
- ddtrace/tracer: annotate execution trace with span IDs by @nsrip-dd in #1674
- tracer: add PII protection for runtime/trace data by @felixge in #1690
- contrib/internal/httptrace: collect client ip if DD_TRACE_CLIENT_IP_ENABLED is set to true by @lievan in #1679
Application Security Management (ASM)
- contrib/gin-gonic: add IP blocking by @Hellzy in #1665
- contrib/labstack/echo: add IP blocking by @Hellzy in #1654
- appsec: add user login and custom events tracking API by @Julio-Guerra in #1648
- internal/appsec: update security rules to v1.4.3 by @Julio-Guerra in #1683
Profiler
- profiler: enable fastdelta by default by @felixge in #1657
- profiler: return copy of delta profile data to avoid race by @nsrip-dd in #1660
Fixes
Application Performance Monitoring (APM)
- contrib/{aws/*,net/http}: fix encoding of http.url by @knusbaum in #1662
- ddtrace/tracer: fixed propagator not updating the tracestate header by @dianashevchenko in #1676
Full Changelog: v1.46.1...v1.47.0
v1.46.1
Summary
This is a patch release containing a minor fix that ensures userinfo strings are not present in URLs sent in the http.url
tag.
What's Changed
Application Performance Monitoring (APM)
Full Changelog: v1.46.0...v1.46.1
v1.46.0
Summary
- This release changes how header extraction and injection are configured. The
DD_PROPAGATION_STYLE_INJECT
andDD_PROPAGATION_STYLE_EXTRACT
environment variables are now deprecated. Prefer the new environment variablesDD_TRACE_PROPAGATION_STYLE_INJECT
,DD_TRACE_PROPAGATION_STYLE_EXTRACT
, andDD_TRACE_PROPAGATION_STYLE
(which generally applies to both inject and extract).
For example, the environment variables would take the following precedence:DD_TRACE_PROPAGATION_STYLE_INJECT
DD_PROPAGATION_STYLE_INJECT
(deprecated)DD_TRACE_PROPAGATION_STYLE
(applies to both inject and extract)- If none of the above, use default values
What's Changed
- tracer: replaces INJECT/EXTRACT environment variable names by @katiehockman in #1603
Full Changelog: v1.45.1...v1.46.0
v1.45.1
Fix the version number reported by dd-trace-go to avoid the release candidate label.