Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .ci/jobs/apm-agent-java-load-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
discover-tags: false
disable-pr-notifications: true
notification-context: 'apm-ci'
head-filter-regex: '(master|PR-.*)'
head-filter-regex: '(main|PR-.*)'
repo: apm-agent-java
repo-owner: elastic
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/apm-agent-java-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
discover-pr-forks-trust: permission
discover-pr-origin: merge-current
discover-tags: true
head-filter-regex: '(master|PR-.*)'
head-filter-regex: '(main|PR-.*)'
notification-context: 'apm-ci'
repo: apm-agent-java
repo-owner: elastic
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/apm-agent-java-schedule-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- string:
name: branch_specifier
default: master
default: main
description: the Git branch specifier to build
pipeline-scm:
script-path: .ci/schedule-weekly.groovy
Expand Down
6 changes: 3 additions & 3 deletions .ci/load/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {
skipDefaultCheckout() // don't re-checkout at avery stage
}
parameters {
string(name: "apm_version", defaultValue: "master", description: "Java agent version, use pr/<PR-number> or git ref or values from curl -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/elastic/apm-agent-java/tags | jq '.[] | .name'")
string(name: "apm_version", defaultValue: "main", description: "Java agent version, use pr/<PR-number> or git ref or values from curl -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/elastic/apm-agent-java/tags | jq '.[] | .name'")
string(name: "jvm_version", defaultValue: "adoptopenjdk-8u275-linux", description: "JVM, use values from: curl -s https://jvm-catalog.elastic.co/jdks/tags/linux,x86_64 | jq '.[] | .id'")
string(name: "jvm_options", defaultValue: "", description: "Extra JVM options")
string(name: "concurrent_requests", defaultValue: "100", description: "The number of concurrent requests to test with")
Expand Down Expand Up @@ -68,10 +68,10 @@ pipeline {
}
}
steps {
echo 'Checking out master branch'
echo 'Checking out main branch'
gitCheckout(
basedir: "${AGENT_BASE_DIR}",
branch: 'master',
branch: 'main',
repo: "https://github.com/elastic/${REPO}.git",
credentialsId: "${CREDENTIALS_ID}",
shallow: false
Expand Down
2 changes: 1 addition & 1 deletion .ci/release/update_cloudfoundry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
source "$(dirname "${0}")/util.sh"

REMOTE_NAME=origin
BRANCH_NAME=master
BRANCH_NAME=main
BASE_URL=https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent
CF_FILE=cloudfoundry/index.yml

Expand Down
2 changes: 1 addition & 1 deletion .ci/schedule-weekly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Agent weekly exhaustive test') {
steps {
build(job: 'apm-agent-java/apm-agent-java-mbp/master',
build(job: 'apm-agent-java/apm-agent-java-mbp/main',
parameters: [
booleanParam(name: 'jdk_compatibility_ci', value: true),
booleanParam(name: 'end_to_end_tests_ci', value: true),
Expand Down
14 changes: 7 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ Just ignore the checkboxes of categories that don't apply.
-->

- [ ] This is an enhancement of existing features, or a new feature in existing plugins
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/CHANGELOG.asciidoc)
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/main/CHANGELOG.asciidoc)
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] Added an API method or config option? Document in which version this will be introduced
- [ ] I have made corresponding changes to the documentation
- [ ] This is a bugfix
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/CHANGELOG.asciidoc)
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/main/CHANGELOG.asciidoc)
- [ ] I have added tests that would fail without this fix
- [ ] This is a new plugin
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/CHANGELOG.asciidoc)
- [ ] My code follows the [style guidelines of this project](https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md#java-language-formatting-guidelines)
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/main/CHANGELOG.asciidoc)
- [ ] My code follows the [style guidelines of this project](https://github.com/elastic/apm-agent-java/blob/masmainter/CONTRIBUTING.md#java-language-formatting-guidelines)
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing [**unit** tests](https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md#testing) pass locally with my changes
- [ ] I have updated [supported-technologies.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/docs/supported-technologies.asciidoc)
- [ ] New and existing [**unit** tests](https://github.com/elastic/apm-agent-java/blob/main/CONTRIBUTING.md#testing) pass locally with my changes
- [ ] I have updated [supported-technologies.asciidoc](https://github.com/elastic/apm-agent-java/blob/main/docs/supported-technologies.asciidoc)
- [ ] Added an API method or config option? Document in which version this will be introduced
- [ ] Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
- [ ] This is something else
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/CHANGELOG.asciidoc)
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/main/CHANGELOG.asciidoc)
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We have some JMH Tests that allow to track the following performance metrics del
In order to run them, you can use the `ElasticApmActiveContinuousBenchmark` from IDE or command line.

Metrics reported by this test are just data, in order to make good use of them, you have to
compare them against `master` branch values as a baseline to know if a given code change has any impact.
compare them against `main` branch values as a baseline to know if a given code change has any impact.

### Configuring IDEs

Expand Down Expand Up @@ -164,7 +164,7 @@ the license headers will be added automatically.

### Workflow

All feature development and most bug fixes hit the master branch first.
All feature development and most bug fixes hit the main branch first.
Pull requests should be reviewed by someone with commit access.
Once approved, the author of the pull request,
or reviewer if the author does not have commit access,
Expand Down Expand Up @@ -232,13 +232,13 @@ we should think about whether they bring us closer to or further away from those
* Continuous Everything
* Unit testing for every PR
* Integration testing for every PR
* Performance testing for every commit to master
* Performance testing for every commit to main
* Releases.
Daily snapshots from the master branch.
Daily snapshots from the main branch.
Automated release process.
* Feature toggles over long-running feature branches
Even if a feature is not quite ready for production use,
merge it into master as soon as possible.
merge it into main as soon as possible.
Create a configuration option for this new feature and disable it by default.
One advantage is that less time will be spent rebasing long lasting feature branches.
Another advantage is that users can try out cutting-edge features by activating a configuration option.
Expand Down Expand Up @@ -299,7 +299,7 @@ For illustration purpose, `1.2.3` will be the target release version, and the gi
1. Build and push a Docker image using the instructions below
Use `SONATYPE_FALLBACK=1 scripts/jenkins/build_docker.sh` to build image with released artifact.
Requires credentials, thus need to delegate this manual step to someone that has them.
1. Update [`cloudfoundry/index.yml`](cloudfoundry/index.yml) on `master`.
1. Update [`cloudfoundry/index.yml`](cloudfoundry/index.yml) on `main`.
1. Publish release on Github. This will notify users watching repository.

### Docker images
Expand Down
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pipeline {
beforeAgent true
allOf {
anyOf {
branch 'master'
branch 'main'
expression { return env.GITHUB_COMMENT?.contains('benchmark tests') }
}
expression { return params.bench_ci }
Expand Down Expand Up @@ -393,7 +393,7 @@ pipeline {
stage('Stable') {
options { skipDefaultCheckout() }
when {
branch 'master'
branch 'main'
}
steps {
deleteDir()
Expand Down Expand Up @@ -427,7 +427,7 @@ pipeline {
branch: 'main')
// It's required to transform the tag value to the artifact version
sh script: ".ci/bump-version.sh ${env.BRANCH_NAME.replaceAll('^v', '')}", label: 'Bump version'
// The opbeans-java pipeline will trigger a release for the master branch
// The opbeans-java pipeline will trigger a release for the main branch
gitPush()
// The opbeans-java pipeline will trigger a release for the release tag
gitCreateTag(tag: "${env.BRANCH_NAME}")
Expand All @@ -439,7 +439,7 @@ pipeline {
}
post {
cleanup {
notifyBuildResult(analyzeFlakey: !isTag(), flakyReportIdx: 'reporter-apm-agent-java-apm-agent-java-master', flakyDisableGHIssueCreation: true)
notifyBuildResult(analyzeFlakey: !isTag(), flakyReportIdx: 'reporter-apm-agent-java-apm-agent-java-main', flakyDisableGHIssueCreation: true)
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-java%2Fapm-agent-java-mbp%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-java/job/apm-agent-java-mbp/job/master/)
[![codecov](https://codecov.io/gh/elastic/apm-agent-java/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/apm-agent-java)
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-java%2Fapm-agent-java-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-java/job/apm-agent-java-mbp/job/main/)
[![codecov](https://codecov.io/gh/elastic/apm-agent-java/branch/main/graph/badge.svg)](https://codecov.io/gh/elastic/apm-agent-java)
[![Maven Central](https://img.shields.io/maven-central/v/co.elastic.apm/apm-agent-api.svg)](https://search.maven.org/search?q=g:co.elastic.apm%20AND%20a:elastic-apm-agent)

# apm-agent-java
Expand Down Expand Up @@ -30,14 +30,14 @@ See the [contributing documentation](CONTRIBUTING.md)

## Snapshots

Snapshots are built from `master` branch and are available here:
Snapshots are built from `main` branch and are available here:

* [elastic-apm-agent.jar](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.apm&a=elastic-apm-agent&v=LATEST)
* [apm-agent-attach-cli.jar](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.apm&a=apm-agent-attach-cli&v=LATEST)
* [apm-agent-attach.jar](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.apm&a=apm-agent-attach&v=LATEST)
* [apm-agent-api.jar](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.apm&a=apm-agent-api&v=LATEST)

Those snapshots include features & bugfixes for the next release, see [releases notes](https://www.elastic.co/guide/en/apm/agent/java/master/_unreleased.html) details.
Those snapshots include features & bugfixes for the next release, see [releases notes](https://www.elastic.co/guide/en/apm/agent/java/main/_unreleased.html) details.

## Build form source

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void beforeEnd(long epochMicros) {
}

// auto-infer context.destination.service.resource as per spec:
// https://github.com/elastic/apm/blob/master/specs/agents/tracing-spans-destination.md#contextdestinationserviceresource
// https://github.com/elastic/apm/blob/main/specs/agents/tracing-spans-destination.md#contextdestinationserviceresource
Destination.Service service = getContext().getDestination().getService();
StringBuilder serviceResource = service.getResource();
if (isExit() && serviceResource.length() == 0 && !service.isResourceSetByUser()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* </pre>
* <p>
* Binary representation (e.g. 0.11.0.0+ Kafka record header), based on
* https://github.com/elastic/apm/blob/master/docs/agent-development.md#binary-fields:
* https://github.com/elastic/apm/blob/main/docs/agent-development.md#binary-fields:
* <pre>
* traceparent = version version_format
* version = 1BYTE ; version is 0 in the current spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public Flux<String> childSpans(int count, long durationMillis, long delay) {

public List<String> webSocketPingPong(int count) {

// taken from https://github.com/spring-projects/spring-framework/blob/master/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java
// taken from https://github.com/spring-projects/spring-framework/blob/main/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java
Flux<String> input = Flux.range(1, count).map(i -> "ping-" + i);

AtomicReference<List<String>> actualRef = new AtomicReference<>();
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ You can use the <<public-api,public API>> to create custom spans and transaction
participate in the
https://docs.google.com/forms/d/e/1FAIpQLScd0RYiwZGrEuxykYkv9z8Hl3exx_LKCtjsqEo1OWx8BkLrOQ/viewform?usp=sf_link[survey]
to vote for prioritizing adding support for the technologies you are using, or
https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md[get involved in the agent development]
https://github.com/elastic/apm-agent-java/blob/main/CONTRIBUTING.md[get involved in the agent development]
and contribute to the auto-instrumentation capabilities of the agent.
2 changes: 1 addition & 1 deletion docs/method-monitoring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ profiling_inferred_spans_excluded_classes=org.example.myapp.ignoreme.*
Inferred spans are estimations, not exact measurements.
They may start after the method actually started, and end before the method actually ended.
This can lead to inconsistencies, all of which are documented in the
https://github.com/elastic/apm-agent-java/tree/master/apm-agent-plugins/apm-profiling-plugin[apm-profiling-plugin readme].
https://github.com/elastic/apm-agent-java/tree/main/apm-agent-plugins/apm-profiling-plugin[apm-profiling-plugin readme].

// Inferred spans are created after the profiling session ends and therefor may appear later in the APM app's span timeline than regular spans.
// Because of this, a regular span cannot be the child of an inferred span.
Expand Down
2 changes: 1 addition & 1 deletion docs/setup-javaagent.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Bind the application to the service:

or use the `services` block in the application manifest file.

For more details on the Elastic Java APM Agent Framework for Cloud Foundry see link:https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-elastic_apm_agent.md[here].
For more details on the Elastic Java APM Agent Framework for Cloud Foundry see link:https://github.com/cloudfoundry/java-buildpack/blob/main/docs/framework-elastic_apm_agent.md[here].

[source,yml]
.manifest.yml
Expand Down
2 changes: 1 addition & 1 deletion docs/supported-technologies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Another option is to add a dependency to the agent's <<public-api, public API>>
in order to programmatically create custom transactions and spans.

If you want to extend the auto-instrumentation capabilities of the agent,
the https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md[contributing guide] should get you started.
the https://github.com/elastic/apm-agent-java/blob/main/CONTRIBUTING.md[contributing guide] should get you started.

NOTE: If, for example,
the HTTP client library of your choice is not listed,
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In addition to agent and application logs, look for `[elastic-apm-agent]` entrie
Agent is updated frequently and releases are not strongly tied to other components in the stack.

Therefore, trying to update to the most recently released agent version is often the recommended first troubleshooting step.
If possible, trying the https://github.com/elastic/apm-agent-java/blob/master/README.md#snapshots[latest-snapshot] is even preferable as it would include fixes that are not yet released.
If possible, trying the https://github.com/elastic/apm-agent-java/blob/main/README.md#snapshots[latest-snapshot] is even preferable as it would include fixes that are not yet released.

See <<upgrading,upgrading documentation>> for more details.

Expand Down
2 changes: 1 addition & 1 deletion docs/tuning-and-overhead.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The main sources of spikes in higher latencies are garbage collection pauses and

We take great care to minimize the memory allocations we do in the Java agent as much as possible.
For example, instead of allocating new objects, we take them from an object pool and return them to the pool when they are not used anymore.
More details on this process can be found https://github.com/elastic/apm-agent-java/blob/master/apm-agent-core/README.md#lifecycle[here].
More details on this process can be found https://github.com/elastic/apm-agent-java/blob/main/apm-agent-core/README.md#lifecycle[here].
When it comes to reporting the recorded events,
we directly serialize them into the output stream of the request to the APM server while only relying on reusable buffers.
This way we can report events without allocating any objects.
Expand Down