Releases: DataDog/dd-trace-go
v1.43.0
Summary
This version notably brings:
- Application Security Monitoring on linux/arm64 and darwin/arm64
- The profiler now captures its own CPU overhead. Previously, CPU profiling could be stopped before follow-on work processing the other profile types completed. There is now proper synchronization so this work is captured. Note that there may be a small (<1%) increase in CPU time on profiles. This is not new overhead, or a regression. It is just work that was already being done, now more accurately reflected.
- The new
ddtrace.UseLogger
function can be used to configure logging for both the tracer and profiler.
A couple of improvements and fixes can also be found in the list of changes below.
Changes
General
- internal/telemetry: support
DD_TELEMETRY_HEARTBEAT_INTERVAL
configuration environment variable by @katiehockman in #1475
Application Performance Monitoring (APM)
- contrib/99designs/gqlgen: fix go module resolution issue by @david-alza in #1457
- contrib/net/http: don't set the request path in the
Route
field by @bitterbit in #1471 - contrib/net/http: ensure
NewServeMux
respectsWithResourceNamer
option by @mccutchen in #1436 - contrib/database/sql: fix race condition when registering drivers by @rafaeljusto in #1450
- ddtrace: make
UseLogger
public by @nsrip-dd in #1466 - ddtrace/tracer: switch atomics to 32 bits by @knusbaum in #1443
- ddtrace/tracer: better trace and span ID randomness by @ajgajg1134 in #1472
- ddtrace: support
tracer.SetUser
on a mockspan by @Julio-Guerra in #1480
Database Monitoring
- contrib/sql/driver: trace sql queries from database drivers implementing
DriverContext
by @david-ds in #1502
Application Security Monitoring (ASM)
- appsec: fix stripping on macOS by @Julio-Guerra in #1481
- appsec: add support for linux/arm64 and darwin/arm64 by @Julio-Guerra in #1494
Profiler
- Cap the CPU profile duration so it doesn't exceed the profiling period (#1486)
- Ensure that CPU profile records profiler work (#1485)
Full Changelog: v1.42.1...v1.43.0
v1.42.1
Summary
This release fixes a compilation issue when building with appsec
on some macOS versions.
Fixes
Application Security Monitoring (ASM)
- appsec: fix libddwaf stripping on macOS (#1481)
Full Changelog: v1.42.0...v1.42.1
v1.42.0
Summary
This release has several exciting features:
- Adds support for Go 1.19. Please note that this means Go 1.17 has maintenance support, and Go 1.16 has legacy support. See our version support policy for more details.
- Introduces support for propagation of trace context via SQL commenting. This experimental feature injects trace context information via sql comments in the sqlcommenter format. It is disabled by default and can be configured via the
DD_TRACE_SQL_COMMENT_INJECTION_MODE
environment variable or via theWithSQLCommentInjection()
option. - Introduces a
WithHostname
option for the profiler, which allows overriding the value used for the"host"
tag
Changes
General
- all: support latest go version 1.19 by @ajgajg1134 in #1410
APM
- contrib: Adding
WithCustomTag
to various integrations by @ajgajg1134 in #1359 - internal/telemetry: give user config priority over environment by @nsrip-dd in #1429
- contrib/database/sql: Add WithErrorCheck options by @soh335 in #1315
Database Management
- contrib/database/sql: add db service name tag and _dd.dbm_trace_injected span tag by @alexandre-normand in #1448
- contrib/database/sql: move trace context info to w3c trace context tags by @alexandre-normand in #1454
ASM
- appsec: update the security event rules to v1.4.0 by @Julio-Guerra in #1464
- appsec/waf: update libddwaf to v1.5.0 by @Julio-Guerra in #1460
Profiler
- profiler: add WithHostname option by @nsrip-dd in #1442
- profiler: log when profiler is stopped by @nsrip-dd in #1433
Full Changelog: v1.41.1...v1.42.0
v1.41.1
Summary
This release fixes a bug in the tracer
library which incorrectly calculated client-side stats for dropped P0 traces.
Changes
Tracer
- ddtrace/tracer: Always count dropped p0 traces and spans by @ajgajg1134 in #1461
Full Changelog: v1.41.0...v1.41.1
v1.41.0
Summary
This release introduces rule based span sampling for the tracer which can be configured through the env var DD_SPAN_SAMPLING_RULES
. For configuration details, see the docs.
Additionally it is now possible to propagate an HTTP request's user id across services when using the SetUser()
tracer function, thanks to the WithPropagation()
option.
Also, the tracer now flushes trace stats when stopping, and some changes to contribs were also made:
- For
net/http
the RoundTripper has a new option to ignore outgoing requests - For
segmentio/kafka.go.v0
the message's topic name is used when the writer's topic name is unavailable - For
99designs/gqlgen
, basic support was added for tracing GraphQL functions
The profiler fixed a bug which caused the first minute of activity to be missing from profiles. The profiler now respects the DD_TRACE_STARTUP_LOGS
environment variable, which can be set to false
to turn off start-up logging. Profiles are now tagged with the seq_id
tag, which counts how many profiles have been uploaded so far.
Some more improvements and fixes can also be found in the list of changes below.
Changes
Tracer
- contrib/net/http: Add new option to RoundTripper to ignore outgoing request (#1403)
- contrib/segmentio: reading topic name from message if writer topic is empty (#1400)
- contrib: support tracing for GraphQL (#1380)
- ddtrace/tracer: add an option to propagate user id over services (#1387)
- ddtrace/tracer: add support for single span matching (#1357)
- ddtrace/tracer: force trace stats flush on Stop, thanks @Kyle-Verhoog (#1393)
Profiler
- profiler: implement profile_seq tag (#1391)
- profiler: respect DD_TRACE_STARTUP_LOGS environment variable (#1385)
- profiler: start collecting profiles immediately (#1417)
Full Changelog: v1.40.1...v1.41.0
v1.40.1
Summary
This release updates the version.go
file so that the version is not a release candidate anymore, but a full release one.
This will be reflected in the tracer's startup logs. There is no changelog since this release is just a version bump to correct the content of version.go
.
v1.40.0
Summary
This release adds the http.url
tag to the list of collected security tags (documentation). This tag will now hold the full http request's URL for server requests instead of the http request's path, so be sure to check that it doesn't break anything on your side when switching over to this version.
Additionally, some more changes were made to a few contribs:
echo.v4
: it is now possible to skip tracing for some endpoints using theWithIgnoreRequest
option.gocql
: errors can now be selectively ignored using theWithErrorCheck
option.kafka-go
: tracing of theFetchMessage()
reader method is now possible.
A couple of improvements and fixes can also be found in the list of changes below.
Changes
General
- go.mod: update github.com/gin-gonic/gin to v1.7.7 (#1341)
- go.mod: bump several dependency versions to avoid vulnerabilities (#1338)
Tracer
- contrib/gocql/gocql: add WithErrorCheck option (#1316)
- contrib/labstack/echo.v4: add WithIgnoreRequest option (#1356), thanks @chrusty
- contrib/segmentio/kafka-go: add tracing of FetchMessage() calls (#1283), thanks @roccoblues
- contrib/net/http: copy request in RoundTrip (#1254)
- ddtrace/tracer: fix race in SetOperationName (#1376)
ASM
- contrib: store the http request's URL in span tags (#1350)
Full Changelog: v1.39.1...v1.40.0
v1.39.1
Summary
This release fixes a bug in the profiler
library which caused the service
tag to sometimes be missing from uploaded profiles. This resulted in profiles appearing on Datadog with the service name unnamed-service
.
Changes
Profiler
Full Changelog: v1.39.0...v1.39.1
v1.39.0
Summary
With this release, the Go tracer now starts reporting a set of security monitoring tags for each server request without the need to enable ASM. Currently, the collected tags are http.client_ip
, http.useragent
, http.status_code
and http.method
, and more will come with future releases. More information about this can be found in the Datadog documentation.
Other additions include a new integration for the logrus
logging package, and overriding the sampling decision of a trace
in downstream services is now possible. Additionally, a new tag aws.request_id
was added to spans for the aws-sdk-go
integration. On top of this the tracer has a new option, WithUniversalVersion
, which removes the limitation of having the service name
match the name defined when starting the tracer for version tracking.
Some more fixes and improvements were made which you can find in the changelog below.
Changes
Repo
- ci: rename branch v1 into main (#1313)
- go.mod: update DataDog/sketches-go to 1.2.1 (#1051)
- go.mod: update several modules to avoid security flaws (#1330)
APM
- contrib/gorm.io/gorm.v1: add context example (#1221)
- ddtrace/tracer: fixed precedence ordering of configuration options (#1232)
- ddtrace/tracer: allow changes of priority even when the root is non-local (#1241)
- contrib/net/http: add dynamic resource naming (#1142)
- aws: add request id to trace (#1266)
- ddtrace/tracer: add WithUniversalVersion option (#1272)
- contrib/sirupsen/logrus: Add context logging hook (#1240)
- ddtrace/tracer: add sample_rate_limit field to startup log. (#1230)
- ddtrace/tracer: handle parent-id header of 0 for synthetics (#1285)
- contrib/internal/httptrace: set http.host tag on request Host not URL.host (#1327)
- contrib/database/sql: sql comment tag injection experimental feature (#1226)
- internal/telemetry: add missing fields to match spec (#1354)
ASM
- contrib: store http.route in span tags (#1342)
- contrib/internal/httptrace: store IP related request headers in span tags (#1346)
- contrib/internal/httptrace: store client ip in span tags (#1328)
- contrib: refactor http request span tags and store user agent in span tags (#1286)
Profiler
Full Changelog: v1.38.1...v1.39.0
v1.38.1
This release contains a set of small fixes for Application Security Monitoring (ASM) and Profiler.
- ASM: fix compilation errors when CGO is disabled or when using MacOS 12.3.1 (#1261)
- Profiler: get the correct profile for the experimental goroutine wait profile (#1262)
Full Changelog: v1.38.0...v1.38.1