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

Micronaut 4.x instrumentation #3355

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a7a6827
micronaut instrumentation: first version
Sep 4, 2023
d77bfef
some progress on advices and build
schikin Sep 4, 2023
d583b3b
working (somewhat) version
schikin Sep 5, 2023
2fd5657
better handling for requests
Sep 5, 2023
de6429e
add better micronaut http request parsing - fill out full url on tran…
schikin Sep 5, 2023
4cca79e
better handling - naming coming from controllers
schikin Oct 11, 2023
c7cb253
clean up imports
schikin Oct 11, 2023
60eb0c1
clean up warnings
schikin Oct 11, 2023
562003a
Bump version.aws.sdk from 2.20.122 to 2.20.139 in /apm-agent-plugins …
dependabot[bot] Sep 3, 2023
9d8a7a0
Disable instrumentation for ES client versions with native instrument…
AlexanderWert Sep 6, 2023
83c2884
Bump version.aws.sdk from 2.20.139 to 2.20.141 in /apm-agent-plugins …
dependabot[bot] Sep 6, 2023
1f71bb9
Bump io.micrometer:micrometer-core from 1.11.2 to 1.11.3 (#3309)
dependabot[bot] Sep 6, 2023
e489605
Bump co.elastic.clients:elasticsearch-java from 8.9.0 to 8.9.1 (#3301)
dependabot[bot] Sep 6, 2023
5842061
docs: what the CI does (#3305)
v1v Sep 6, 2023
00907da
Replace binary propagation with UTF8 encoded text propagation (#3300)
JonasKunz Sep 6, 2023
2e5a7e2
Add error reporting API to tracer-api. (#3273)
raphw Sep 8, 2023
e072f71
Bump com.datastax.cassandra:cassandra-driver-core from 3.11.4 to 3.11…
dependabot[bot] Sep 12, 2023
f96ec8c
Remove IntelliJ debugging agent detection (#3315)
JonasKunz Sep 12, 2023
b5e9218
Clarify docs on disable_metrics behaviour for micrometer (#3320)
JonasKunz Sep 13, 2023
7004e25
Change 'cloud.project.id' for GCP metadata to be the 'project-id' (#3…
trentm Sep 13, 2023
01b5262
Moves ServiceInfo to tracer module and reduce dependency exposure to …
raphw Sep 13, 2023
b95fe53
Fix DB2 jdbc connection instrumentation (#3313)
JonasKunz Sep 13, 2023
4554fcc
Fix typo in plugin-API Readme (#3322)
kelunik Sep 14, 2023
68b100a
Create catalog-info file (#3312)
elastic-backstage-prod[bot] Sep 14, 2023
a67f56e
Bump io.micrometer:micrometer-core from 1.11.3 to 1.11.4 (#3324)
dependabot[bot] Sep 18, 2023
beea054
Bump version.byte-buddy from 1.14.7 to 1.14.8 (#3325)
dependabot[bot] Sep 19, 2023
2cb8aab
OpenTelemetry metrics exporter instrumentation breaks with instrument…
JonasKunz Sep 20, 2023
f11b3e3
Fixes ByteBuddy AbstractMethodError which could occur when running te…
JonasKunz Sep 21, 2023
72b758c
Prepare changelog for release 1.43.0
apmmachine Sep 26, 2023
684fae4
[maven-release-plugin] prepare release v1.43.0
apmmachine Sep 26, 2023
8dbc1f0
[maven-release-plugin] prepare for next development iteration
apmmachine Sep 26, 2023
51e4f74
added entry of new external plugin (#3334)
videnkz Sep 27, 2023
2059d74
Fix maven deploy step being skipped if preparation is skipped (#3335)
JonasKunz Sep 27, 2023
a7b3d56
Update cloudfoundry for 1.43.0 release
apmmachine Sep 27, 2023
65a63b0
action: use latest version for the cleanup (#3337)
v1v Sep 29, 2023
0e01015
add minimal mergify config (#3338)
SylvainJuge Sep 29, 2023
e558260
fix java 11 and java 21 test failures (#3344)
SylvainJuge Oct 3, 2023
ad1f63b
mergify: merge -> merge_method (#3347)
SylvainJuge Oct 5, 2023
94ca2de
Bump version.aws.sdk from 2.20.141 to 2.20.157 in /apm-agent-plugins …
dependabot[bot] Oct 5, 2023
3ef7a32
Bump org.springframework.boot:spring-boot-dependencies from 2.7.10 to…
dependabot[bot] Oct 5, 2023
e77665a
captured span.sync attribute for ES restclient spans plugins (#3329)
videnkz Oct 5, 2023
657665a
[mergify] fix mergify config again (#3348)
SylvainJuge Oct 6, 2023
273dc58
Bump org.ow2.asm:asm-tree from 9.5 to 9.6 (#3349)
dependabot[bot] Oct 10, 2023
5a7309d
Fix multiple spans being created for HTTPUrlConnection HEAD requests …
JonasKunz Oct 10, 2023
2758bd0
add changelog entry
schikin Oct 11, 2023
14cc8f4
add supported technology entry
schikin Oct 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .buildkite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Buildkite

This README provides an overview of the Buildkite pipeline used to automate the build and publishing process.

## Release pipeline

This is the Buildkite pipeline for releasing the APM Agent Java.

### Pipeline Configuration

To view the pipeline and its configuration, click [here](https://buildkite.com/elastic/apm-agent-java-release) or
go to the definition in the `elastic/ci` repository.

## Snapshot pipeline

This is the Buildkite pipeline for the APM Agent java in charge of the snaposhots.

### Pipeline Configuration

To view the pipeline and its configuration, click [here](https://buildkite.com/elastic/apm-agent-java-snapshot) or
go to the definition in the `elastic/ci` repository.
4 changes: 4 additions & 0 deletions .buildkite/load-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @reakaleek: This is a place holder to create the pipeline in Buildkite. I will work on it, in a follow-up.
steps:
- label: ":wave: Greetings" # Label (with rich emojis https://ela.st/bk-emoji).
command: "echo 'My first pipeline!'" # Command to run (evaluated by Bash).
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ updates:
- dependency-name: "com.datastax.oss:java-driver-core"
- dependency-name: "io.micrometer:*"
- dependency-name: "redis.clients:*"
- dependency-name: "org.elasticsearch.client:*"
- dependency-name: "co.elastic.clients:*"
- dependency-name: "io.vertx:*"
- dependency-name: "org.apache.logging.log4j:*"
- dependency-name: "org.springframework.boot:*"
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## CI/CD

There are 4 main stages that run on GitHub actions:

* Build
* Unit Test
* Integration Test
* Release

There are some other stages that run for every push on the main branches:

* [Microbenchmark](./microbenchmark.yml)
* [Snapshoty](./snapshoty.yml)
* [Sync-branches](./sync-branches.yml)

### Scenarios

* Tests should be triggered on branch, tag and PR basis.
* Commits that are only affecting the docs files should not trigger any test or similar stages that are not required.
* Automated release in the CI gets triggered through a GitHub workflow.
* **This is not the case yet**, but if Github secrets are required then Pull Requests from forked repositories won't run any build accessing those secrets. If needed, then create a feature branch (opened directly on the upstream project).

### How to interact with the CI?

#### On a PR basis

Once a PR has been opened then there are two different ways you can trigger builds in the CI:

1. Git commit based
1. UI based, any Elasticians can force a build through the GitHub UI

#### Branches

Every time there is a merge to main or any branches the whole workflow will compile and test on Linux and Windows.

### Release process

This process has been fully automated and it gets triggered manually when running the [release](https://github.com/elastic/apm-agent-java/actions/workflows/release.yml) workflow. It runs then a Buildkite pipeline in charge of generating and publishing the artifacts,
for further details please go to [the buildkite folder](../../.buildkite/README.md).

The tag release follows the naming convention: `v.<major>.<minor>.<patch>`, where `<major>`, `<minor>` and `<patch>`.

### OpenTelemetry

There is a GitHub workflow in charge to populate what the workflow run in terms of jobs and steps. Those details can be seen in [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).

## Bump automation

[updatecli](https://www.updatecli.io/) is the tool we use to automatically update the specs
the [APM agents](./updatecli.yml) use.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ jobs:
with:
name: build
path: ${{ github.workspace }}
# As long as there are some space issues with the CI runners.
- name: Free Disk Space
continue-on-error: true
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
with:
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
tool-cache: false
- uses: ./.github/workflows/maven-goal
with:
command: ./mvnw -q -P ci-non-application-server-integration-tests verify
Expand Down Expand Up @@ -205,7 +217,8 @@ jobs:
path: ${{ github.workspace }}
# As long as there are some space issues with the CI runners.
- name: Free Disk Space
uses: jlumbroso/free-disk-space@0add001504c51b93b35ac8e81d252bdd47e4ef07
continue-on-error: true
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
with:
android: true
dotnet: true
Expand Down Expand Up @@ -283,7 +296,7 @@ jobs:
distribution: 'temurin'
- version: 20
distribution: 'temurin'
- version: 21-ea
- version: 21
distribution: 'zulu'
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:

maven_central_deploy:
name: "Deploy to Maven Central (Buildkite)"
if: ${{ ! inputs.skip_maven_deploy }}
if: ${{ ! inputs.skip_maven_deploy && ( inputs.skip_preparation || success() ) }}
runs-on: ubuntu-latest
needs:
- prepare_release
Expand Down
14 changes: 14 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
queue_rules:
- name: default
# merge method needs to be set to 'squash' to match the repository config
merge_method: squash
# branch protection rules are automatically included, no extra rule needed for now

pull_request_rules:
- name: Automatic squash and merge on approval with success checks and ready-to-merge label
conditions:
- label=ready-to-merge
- base=main
actions:
queue:
name: default
29 changes: 23 additions & 6 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,35 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:

[float]
===== Bug fixes
* Prevent bad serialization in edge cases for span compression - {pull}3293[#3293]
* Allow overriding of transaction type for Servlet-API transactions - {pull}3226[#3226]
* Fix micrometer histogram serialization - {pull}3290[#3290], {pull}3304[#3304]
* Fix transactions not being correctly handled in certain edge cases - {pull}3294[#3294]
* Fixed too many spans being created for `HTTPUrlConnection` requests with method `HEAD` - {pull}3353[#3353]

===== Features
* Support for micronaut 4.x

[[release-notes-1.x]]
=== Java Agent version 1.x

[[release-notes-1.43.0]]
==== 1.43.0 - 2023/09/26

[float]
===== Features
* Add support for Elasticsearch client 8.9 - {pull}3283[#3283]
* Added `baggage_to_attach` config option to allow automatic lifting of baggage into transaction, span and error attributes - {pull}3288[#3288], {pull}3289[#3289]
* Exclude elasticsearch 8.10 and newer clients from instrumentation because they natively support OpenTelemetry - {pull}3303[#3303]
* Switched to OpenTelemetry compatible context propagation for Kafka - {pull}3300[#3300]
* Changed `cloud.project.id` collected in Google Cloud (GCP) to be the `project-id` - {issues}3311[#3311]
* Allow running the IntelliJ debug agent in parallel - {pull}3315[#3315]
* Capture `span.sync` = `false` for ES restclient async spans plugins

[[release-notes-1.x]]
=== Java Agent version 1.x
[float]
===== Bug fixes
* Prevent bad serialization in edge cases for span compression - {pull}3293[#3293]
* Allow overriding of transaction type for Servlet-API transactions - {pull}3226[#3226]
* Fix micrometer histogram serialization - {pull}3290[#3290], {pull}3304[#3304]
* Fix transactions not being correctly handled in certain edge cases - {pull}3294[#3294]
* Fixed JDBC instrumentation for DB2 - {pull}3313[#3313]
* Fixed OpenTelemetry metrics export breaking when `instrument=false` is configured - {pull}3326[#3326]

[[release-notes-1.42.0]]
==== 1.42.0 - 2023/08/11
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-api</artifactId>
Expand Down
9 changes: 8 additions & 1 deletion apm-agent-attach-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -56,6 +56,13 @@
<version>${version.bouncy-castle.bc-fips}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- required for the inherited assertJ and Mockito dependencies-->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-dep</artifactId>
<version>${version.byte-buddy}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-attach/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-attach</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-benchmarks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-bootstrap</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-builds/apm-agent-java8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>co.elastic.apm</groupId>
<artifactId>apm-agent-builds</artifactId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-java8</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-builds/apm-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>co.elastic.apm</groupId>
<artifactId>apm-agent-builds</artifactId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent</artifactId>
Expand Down
7 changes: 6 additions & 1 deletion apm-agent-builds/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -262,6 +262,11 @@
<artifactId>apm-micrometer-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apm-micronaut-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apm-mongodb3-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-cached-lookup-key/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-agent-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-agent-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm-agent-parent</artifactId>
<groupId>co.elastic.apm</groupId>
<version>1.42.1-SNAPSHOT</version>
<version>1.43.1-SNAPSHOT</version>
</parent>

<artifactId>apm-agent-core</artifactId>
Expand Down
Loading
Loading