Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ELASTIC_APM_CLOUD_PROVIDER default value #1494

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
go-version: [ "1.15", "1.16", "1.17", "1.18", "1.19", "oldstable", "stable" ]
go-version: [oldstable, stable]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Unit tests
Expand All @@ -96,7 +96,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Unit tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/microbenchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
contents: read

env:
GO_VERSION: 1.15.10
GO_VERSION: stable

jobs:
microbenchmark:
Expand Down
2 changes: 0 additions & 2 deletions .jenkins-edge.yml

This file was deleted.

10 changes: 9 additions & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ endif::[]
[[unreleased]]
=== Unreleased

https://github.com/elastic/apm-agent-go/compare/v2.4.2...main[View commits]
https://github.com/elastic/apm-agent-go/compare/v2.4.3...main[View commits]

[[release-notes-2.x]]
=== Go Agent version 2.x

[[release-notes-2.4.3]]
==== 2.4.3 - 2023/06/22

- Fixed a data race in HTTP client instrumentation {pull}1472[#1472]
- Bumped minimum Go version to 1.19 {pull}1453[#1453]
- Fixed mixing of OTel and Elastic APM instrumentation {pull}1450[#1450]
- Updated to stable OTel metrics API {pull}1448[#1448]

[[release-notes-2.4.2]]
==== 2.4.2 - 2023/05/22

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEST_TIMEOUT?=5m
GO_LICENSER_EXCLUDE=stacktrace/testdata
GO_LANGUAGE_VERSION=1.15
GO_LANGUAGE_VERSION=1.19

.PHONY: check
check: precheck check-modules test
Expand All @@ -21,8 +21,8 @@ check-licenses:
go run -modfile=tools/go.mod github.com/elastic/go-licenser -d $(patsubst %,-exclude %,$(GO_LICENSER_EXCLUDE)) .

.PHONY: check-modules
check-modules:
cd scripts/genmod && go run main.go -go=$(GO_LANGUAGE_VERSION) -check ../..
check-modules: update-modules
git diff --exit-code

.PHONY: check-vanity-import
check-vanity-import:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
This is the official Go package for [Elastic APM](https://www.elastic.co/solutions/apm).

The Go agent enables you to trace the execution of operations in your application,
sending performance metrics and errors to the Elastic APM server. You can find a
list of the supported frameworks and other technologies in the [documentation](https://www.elastic.co/guide/en/apm/agent/go/current/supported-tech.html).
sending performance metrics and errors to the Elastic APM server.

We'd love to hear your feedback, please take a minute to fill out our [survey](https://docs.google.com/forms/d/e/1FAIpQLScbW7D8m-otPO7cxqeg7XstWR8vMnxG6brnXLs_TFVSTHuHvg/viewform?usp=sf_link).

Expand All @@ -21,10 +20,11 @@ go get go.elastic.co/apm/v2

## Requirements

Tested with Go 1.15+ on Linux, Windows and MacOS.

Requires [APM Server](https://github.com/elastic/apm-server) v6.5 or newer.

You can find a list of the supported frameworks and other technologies in the
[documentation](https://www.elastic.co/guide/en/apm/agent/go/current/supported-tech.html).

## License

Apache 2.0.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ for backwards compatibility with older versions of Elastic APM agents.
[options="header"]
|============
| Environment | Default | Example
| `ELASTIC_APM_CLOUD_PROVIDER` | `"none"` | `"aws"`
| `ELASTIC_APM_CLOUD_PROVIDER` | `"auto"` | `"aws"`
|============

This config value allows you to specify which cloud provider should be assumed
Expand Down
3 changes: 2 additions & 1 deletion docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ include::./supported-tech.asciidoc[Supported Technologies]
include::./configuration.asciidoc[Configuration]
include::./api.asciidoc[API documentation]
include::./metrics.asciidoc[Metrics]
include::./logs.asciidoc[Log Correlation]
include::./opentelemetry.asciidoc[OpenTelemetry API]
include::./opentracing.asciidoc[OpenTracing API]
include::./log-correlation.asciidoc[Log Correlation]
include::./contributing.asciidoc[Contributing]
include::./troubleshooting.asciidoc[Troubleshooting]
include::./upgrading.asciidoc[Upgrading]
include::./release-notes.asciidoc[Release notes]
include::./redirects.asciidoc[]
endif::[]
42 changes: 31 additions & 11 deletions docs/log-correlation.asciidoc → docs/logs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
[[log-correlation]]
== Log Correlation
[[logs]]
== Logs

Elastic APM Go Agent provides <<log-correlation-ids>>.
The agent will automaticaly inject correlation IDs that allow navigation between logs, traces and services.

This features is part of {observability-guide}/application-logs.html[Application log ingestion strategies].

The {ecs-logging-go-ref}/intro.html[`ecs-logging-go`] library can also be used to use the {ecs-logging-ref}/intro.html[ECS logging] format without an APM agent.
When deployed with the Go APM agent, the agent will provide <<log-correlation-ids,log correlation>> IDs.

The Go agent provides integrations for popular logging frameworks that
inject trace ID fields into the application's log records. You can find a list of
the supported logging frameworks under <<supported-tech-logging, supported technologies>>.

If your favorite logging framework is not already supported, there are two other options:

* Open a feature request, or contribute code, for additional support as described in <<contributing>>.
* Manually inject trace IDs into log records, as described below in <<log-correlation-manual>>.

Regardless of how you integrate APM with logging, use {filebeat-ref}[Filebeat] to
send your logs to Elasticsearch, in order to correlate your traces and logs and link from
APM to the {observability-guide}/monitor-logs.html[Logs app].
[[log-correlation-ids]]
== Log Correlation

{apm-guide-ref}/log-correlation.html[Log correlation] allows you to navigate to all logs belonging to a particular trace
and vice-versa: for a specific log, see in which context it has been logged and which parameters the user provided.

In order to correlate logs from your app with transactions captured by the
Elastic APM Go Agent, your logs must contain one or more of the following identifiers:

* {ecs-ref}/ecs-tracing.html[`transaction.id`]
* {ecs-ref}/ecs-tracing.html[`trace.id`]
* {ecs-ref}/ecs-error.html[`span.id`]

In order to correlate the logs to the service and environment, the logs should also contain the
following fields:

- {ecs-ref}/ecs-service.html[`service.name`]
- {ecs-ref}/ecs-service.html[`service.version`]
- {ecs-ref}/ecs-service.html[`service.environment`]

[float]
[[log-correlation-manual]]
Expand All @@ -27,11 +50,8 @@ or unstructured logging.
[[log-correlation-manual-structured]]
==== Manual log correlation (structured)

For correlating structured logs with traces, the following fields should be added to your logs:

- `trace.id`
- `transaction.id`
- `span.id` (if logging in the context of a span)
For correlating structured logs with traces and services, the fields defined <<log-correlation-ids,above>>
should be added to logs.

Given a transaction object, you can obtain its trace ID and transaction ID using
the <<transaction-tracecontext, apm.Transaction.TraceContext>> method. Similarly,
Expand Down
9 changes: 9 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
["appendix",role="exclude",id="redirects"]
= Deleted pages

The following pages have moved or been deleted.

[role="exclude",id="log-correlation"]
=== Log correlation

This section has moved. See <<logs>>.
5 changes: 3 additions & 2 deletions docs/set-up.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ go get -u go.elastic.co/apm/v2
[float]
=== Requirements

The Go agent is tested with Go 1.8+ on Linux, Windows, and MacOS.
You can find a list of the supported frameworks and other technologies in the
<<supported-tech>> section.

[float]
[[instrumenting-source]]
Expand All @@ -46,4 +47,4 @@ See <<configuration>> to learn about all available options.

include::./instrumenting.asciidoc[]
include::./custom-instrumentation.asciidoc[]
include::./context-propagation.asciidoc[]
include::./context-propagation.asciidoc[]
13 changes: 5 additions & 8 deletions docs/supported-tech.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ If you would like to get more involved, take a look at the <<contributing, contr
[[supported-tech-go]]
=== Go

The Elastic APM Go agent naturally requires Go. We will support, at a minimum,
the last two major Go releases as described by
https://golang.org/doc/devel/release.html#policy[Go's Release Policy]. Older
versions of Go will be supported on a best-effort basis.

We currently test the agent with all major versions of Go since 1.8. Some
integration modules may require a more recent version of Go due to third-party
dependencies.
The Elastic APM Go agent naturally requires Go. We support the last two major
Go releases as described by https://golang.org/doc/devel/release.html#policy[Go's Release Policy]:

> Each major Go release is supported until there are two newer major releases.
> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.

[float]
[[supported-tech-web-frameworks]]
Expand Down
17 changes: 14 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ require (
github.com/elastic/go-sysinfo v1.7.1
github.com/google/go-cmp v0.5.4
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.8.4
go.elastic.co/fastjson v1.1.0
golang.org/x/sys v0.0.0-20220209214540-3681064d5158
golang.org/x/sys v0.8.0
)

go 1.15
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elastic/go-windows v1.0.0 // indirect
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
)

go 1.19
18 changes: 10 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/elastic/go-sysinfo v1.7.1 h1:Wx4DSARcKLllpKT2TnFVdSUJOsybqMYCNQZq1/wO+s0=
github.com/elastic/go-sysinfo v1.7.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0=
github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY=
Expand All @@ -26,8 +27,8 @@ github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0 h1:c8R11WC8m7KNM
github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.elastic.co/fastjson v1.1.0 h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4=
go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI=
Expand All @@ -43,20 +44,21 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M=
howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
35 changes: 31 additions & 4 deletions internal/apmgodog/go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,43 @@
module apmgodog/v2

go 1.15
go 1.19

require (
github.com/cucumber/godog v0.12.2
go.elastic.co/apm/module/apmgrpc/v2 v2.4.2
go.elastic.co/apm/module/apmhttp/v2 v2.4.2
go.elastic.co/apm/v2 v2.4.2
go.elastic.co/apm/module/apmgrpc/v2 v2.4.3
go.elastic.co/apm/module/apmhttp/v2 v2.4.3
go.elastic.co/apm/v2 v2.4.3
go.elastic.co/fastjson v1.1.0
google.golang.org/grpc v1.21.1
)

require (
github.com/armon/go-radix v1.0.0 // indirect
github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect
github.com/cucumber/messages-go/v16 v16.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elastic/go-sysinfo v1.7.1 // indirect
github.com/elastic/go-windows v1.0.0 // indirect
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.5.4 // indirect
github.com/hashicorp/go-immutable-radix v1.3.0 // indirect
github.com/hashicorp/go-memdb v1.3.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
)

replace go.elastic.co/apm/v2 => ../..

replace go.elastic.co/apm/module/apmgrpc/v2 => ../../module/apmgrpc
Expand Down
Loading
Loading