Skip to content

Releases: elastic/apm-agent-go

v1.5.0

31 Jul 23:45
@axw axw
v1.5.0
a6e8c6c
Compare
Choose a tag to compare
  • Add Context.SetCustom (#581)
  • Add support for extracting UUID-like container IDs (#577)
  • Introduce transaction/span breakdown metrics (#564)
  • Optimised HTTP request body capture (#592)
  • Fixed transaction encoding to drop tags (and other context) for non-sampled transactions (#593)
  • Introduce central config polling (#591)
  • Fixed apmgrpc client interceptor, propagating trace context for non-sampled transactions (#602)

v1.4.0

20 Jun 09:50
@axw axw
v1.4.0
c497b72
Compare
Choose a tag to compare
  • Update opentracing-go dependency to v1.1.0
  • Update HTTP routers to return " unknown route" if route cannot be matched (#486)
  • module/apmchi: introduce instrumentation for go-chi/chi router (#495 - thanks @rliebz!)
  • module/apmgoredis: introduce instrumentation for the go-redis/redis client (#505 - thanks @aspacca!)
  • module/apmsql: exposed the QuerySignature function (#515)
  • module/apmgopg: introduce instrumentation for the go-pg/pg ORM (#516 - thanks @macnibblet!)
  • module/apmmongo: set minimum Go version to Go 1.10 (#522)
  • internal/sqlscanner: bug fix for multi-byte rune handling (#535)
  • module/apmgrpc: added WithServerRequestIgnorer server option (#531 - thanks @omrishtam!)
  • Introduce ELASTIC_APM_GLOBAL_LABELS config (#539)
  • module/apmgorm: register row_query callbacks (#532 - thanks @Vilsol!)
  • Introduce ELASTIC_APM_STACK_TRACE_LIMIT config (#559)
  • Include agent name/version and Go version in User-Agent (#560)
  • Truncate error.culprit at 1024 chars (#561)

v1.3.0

21 Mar 01:49
@axw axw
392aef3
Compare
Choose a tag to compare
  • Rename "metricset.labels" to "metricset.tags" (#438)
  • Introduce ELASTIC_APM_DISABLE_METRICS to disable metrics with matching names (#439)
  • module/apmelasticsearch: introduce instrumentation for Elasticsearch clients (#445)
  • module/apmmongo: introduce instrumentation for the MongoDB Go Driver (#452)
  • Introduce ErrorDetailer interface (#453)
  • module/apmhttp: add CloseIdleConnectons and CancelRequest to RoundTripper (#457)
  • Allow specifying transaction (span) ID via TransactionOptions/SpanOptions (#463)
  • module/apmzerolog: introduce zerolog log correlation and exception-tracking writer (#428)
  • module/apmelasticsearch: capture body for _msearch, template and rollup search (#470)
  • Ended Transactions/Spans may now be used as parents (#478)
  • Introduce apm.DetachedContext for async/fire-and-forget trace propagation (#481)
  • module/apmechov4: add a copy of apmecho supporting echo/v4 (#477, thanks @1995parham!)

v1.2.0

17 Jan 10:43
@axw axw
v1.2.0
cc1e77d
Compare
Choose a tag to compare
  • Add "transaction.sampled" to errors (#410)
  • Enforce license header in source files with go-licenser (#411)
  • module/apmot: ignore "follows-from" span references (#414)
  • module/apmot: report error log records (#415)
  • Introduce ELASTIC_APM_CAPTURE_HEADERS to control HTTP header capture (#418)
  • module/apmzap: introduce zap log correlation and exception-tracking hook (#426)
  • type Error implements error interface (#399)
  • Add "transaction.type" to errors (#433)
  • Added instrumentation-specific Go modules (i.e. one for each package under apm/module) (#405)

v1.1.3

07 Jan 02:52
@axw axw
2773fa2
Compare
Choose a tag to compare

This is a minor fix release, adding support for the new github.com/pkg/errors.Frame type (see #409). We continue to support github.com/pkg/errors v0.8.x, but will also support master/v0.9.0 when it comes.

v1.1.2

04 Jan 03:51
@axw axw
9f89e36
Compare
Choose a tag to compare

Fixed a minor data race between Tracer.Active and Tracer.loop (#406). The only significant symptom of this race would have been race test failures, such as observed in apm-server.

v1.1.1

14 Dec 01:46
@axw axw
6973650
Compare
Choose a tag to compare

Fixes a bug in the builtin metrics: CPU% metrics are now correctly reported in the range [0,1], no longer scaled by 100.

v1.1.0

13 Dec 03:36
@axw axw
9abbae5
Compare
Choose a tag to compare

Major changes / new instrumentation modules

module/apmlogrus: introduce Logrus error-tracking hook, and log correlation (#381)

We have introduced module/apmlogrus, which provides two integrations with Logrus: a logrus.Hook implementation which sends error log records to Elastic APM, and a function for adding trace, transaction, and span ID fields to log records.

module/apmbeego: introduce Beego instrumentation module (#386)

This new instrumentation module provides tracing middleware for the Beego web framework. This currently covers the web requests, and not beego/orm.

Stop pooling Transaction/Span/Error, introduce internal pooled objects (#319)

Prior to this release, Transaction, Span and Error objects returned by StartTransaction, StartSpan and NewError respectively were pooled to minimise memory allocation overhead, at the cost of having to handle the objects with care; once a transaction was ended, it would no longer be valid for use. The intention was to educate users to handle these objects carefully.

It turned out to be too easy to access ended transactions, particularly when used with context objects with cancellation. For example, an instrumented HTTP handler might pass its context onto another goroutine; some time later that goroutine attempts to start a span using the context, but the request has timed out and accordingly ended the transaction.

We have changed how pooling works, so that it operates internally within the Transaction, Span, and Error objects. This means a slightly higher allocation overhead, but it is now safe to access an ended Transaction, Span, or Error.

Bug fixes

apm.StartSpanOptions fixed to stop ignoring options (#326)

apm.StartSpanOptions was ignoring the options provided, which meant, for example, you could not provide the start timestamp. Many thanks to @ChristophPech for the fix!

module/apmsql: don't report driver.ErrBadConn, context.Canceled (#346, #348)

module/apmsql will no longer report "bad connection" or "context canceled" errors.

"Bad connection" errors occur when a pooled database connection becomes stale/unusable, which can occur in normal usage. Internally, database/sql will attempt to fetch another pooled connection, and finally attempt to make a new connection, under these circumstances. Since these are not indicative of application errors, and are not actionable, we will stop reporting them to the user.

Similarly, we were reporting "context canceled" errors from module/apmsql, as these may be intentional and not related to any application logic error.

Other changes

  • ELASTIC_APM_SERVER_CERT enables server certificate pinning (#325)
  • Add Docker container ID to metadata (#330)
  • Add Kubernetes pod info to metadata (#342)
  • Added distributed trace context propagation to apmgrpc (#335)
  • Introduce Span.Subtype, Span.Action (#332)
  • Enable metrics collection with default interval of 30s (#322)
  • Added ErrorLogRecord.Error field, for associating an error value with a log record (#380)
  • module/apmhttp: report status code for client spans (#388)

v1.0.0

14 Nov 14:48
@axw axw
cb9bc73
Compare
Choose a tag to compare

Major changes

The Go agent is now generally available. This version requires APM Server v6.5 or later.

  • The canonical import path is now "go.elastic.co/apm", and top-level package name is "apm" (#202)
  • The v2 intake protocol is now being used, and support for distributed tracing added (#180)
  • We've added support for multiple APM Server URLs with failover (#233)
  • All HTTP request/response headers are now reported, with configurable filtering (#280)
  • ELASTIC_APM_LOG_FILE and ELASTIC_APM_LOG_LEVEL introduced for logging agent behaviour (#313)
  • We've added support for mixing OpenTracing spans with native transactions/spans (#235)

New instrumentation modules

  • module/apmredigo: introduce gomodule/redigo instrumentation (#248)
  • module/apmrestful: introduce emicklei/go-restful instrumentation (#270)

Other changes

  • Unexported Transaction.Timestamp and Span.Timestamp (#207)
  • Dropped Context.SetCustom (#284)
  • Add support for span tags (#213)
  • Add jitter (+/-10%) to backoff on transport error (#212)
  • Require units for size configuration (#223)
  • Require units for duration configuration (#211)
  • Drop SetHTTPResponseHeadersSent and SetHTTPResponseFinished methods from Context (#238)
  • Stop setting custom context (gin.handler) in apmgin (#238)
  • Set response context in errors reported by web modules (#238)
  • Update Sampler interface to take TraceContext (#243)
  • Truncate SQL statements to a maximum of 10000 chars, all other strings to 1024 (#244, #276)
  • Add leading slash to URLs in transaction/span context (#250)
  • Add Transaction.Context method for setting framework (#252)
  • Timestamps are now reported as usec since epoch, spans no longer use "start" offset (#257)
  • Fix panic handling in web instrumentations (#273)
  • Migrate internal/fastjson to go.elastic.co/fastjson (#275)
  • Reuse memory for tags (#286)
  • Return a more helpful error message when /intake/v2/events 404s, to detect old servers (#290)
  • Implement test service for w3c/distributed-tracing test harness (#293)
  • End HTTP client spans on response body closure (#289)
  • module/apmgrpc requires Go 1.9+ (#300)
  • Invalid tag key characters are replaced with underscores (#308)
  • ELASTIC_APM_SANITIZE_FIELD_NAMES and ELASTIC_APM_IGNORE_URLS now use wildcard matching (#260)

0.5.2

20 Sep 02:50
@axw axw
df3d15a
Compare
Choose a tag to compare

Fixed premature Span.End() in apmgorm callback, causing a data-race with captured errors (#229)