diff --git a/.ci/jobs/apm-agent-java-load-mbp.yml b/.ci/jobs/apm-agent-java-load-mbp.yml index d1aa77a194..512d8e0d6b 100644 --- a/.ci/jobs/apm-agent-java-load-mbp.yml +++ b/.ci/jobs/apm-agent-java-load-mbp.yml @@ -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 diff --git a/.ci/jobs/apm-agent-java-mbp.yml b/.ci/jobs/apm-agent-java-mbp.yml index 9bd326af9b..d06105d8aa 100644 --- a/.ci/jobs/apm-agent-java-mbp.yml +++ b/.ci/jobs/apm-agent-java-mbp.yml @@ -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 diff --git a/.ci/jobs/apm-agent-java-schedule-weekly.yml b/.ci/jobs/apm-agent-java-schedule-weekly.yml index 14228c2771..53163d3c54 100644 --- a/.ci/jobs/apm-agent-java-schedule-weekly.yml +++ b/.ci/jobs/apm-agent-java-schedule-weekly.yml @@ -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 diff --git a/.ci/load/Jenkinsfile b/.ci/load/Jenkinsfile index 796adc025c..e95e0e28ca 100644 --- a/.ci/load/Jenkinsfile +++ b/.ci/load/Jenkinsfile @@ -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") @@ -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 diff --git a/.ci/release/update_cloudfoundry.sh b/.ci/release/update_cloudfoundry.sh index 8ced2ca384..436b5b2365 100755 --- a/.ci/release/update_cloudfoundry.sh +++ b/.ci/release/update_cloudfoundry.sh @@ -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 diff --git a/.ci/schedule-weekly.groovy b/.ci/schedule-weekly.groovy index 58a6025efe..aa19116e3b 100644 --- a/.ci/schedule-weekly.groovy +++ b/.ci/schedule-weekly.groovy @@ -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), diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 70fcf73ade..7a22d4c074 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -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) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 07903a8a56..eefbead585 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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, @@ -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. @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 312e24205d..11ad9dd7d5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 } @@ -393,7 +393,7 @@ pipeline { stage('Stable') { options { skipDefaultCheckout() } when { - branch 'master' + branch 'main' } steps { deleteDir() @@ -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}") @@ -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) } } } diff --git a/README.md b/README.md index 6a42e65975..dd7e1fc3a7 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java index dcdd548206..610137cd1e 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java @@ -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()) { diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java index cde3f6126a..4c71bf330c 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java @@ -53,7 +53,7 @@ * *

* 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: *

  *      traceparent     = version version_format
  *      version         = 1BYTE                   ; version is 0 in the current spec
diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/src/main/java/co/elastic/apm/agent/springwebflux/testapp/GreetingWebClient.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/src/main/java/co/elastic/apm/agent/springwebflux/testapp/GreetingWebClient.java
index c064d6fca9..ba7d889758 100644
--- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/src/main/java/co/elastic/apm/agent/springwebflux/testapp/GreetingWebClient.java
+++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/src/main/java/co/elastic/apm/agent/springwebflux/testapp/GreetingWebClient.java
@@ -124,7 +124,7 @@ public Flux childSpans(int count, long durationMillis, long delay) {
 
     public List 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 input = Flux.range(1, count).map(i -> "ping-" + i);
 
         AtomicReference> actualRef = new AtomicReference<>();
diff --git a/docs/faq.asciidoc b/docs/faq.asciidoc
index ce621844d4..29d5004672 100644
--- a/docs/faq.asciidoc
+++ b/docs/faq.asciidoc
@@ -74,5 +74,5 @@ You can use the <> 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.
diff --git a/docs/method-monitoring.asciidoc b/docs/method-monitoring.asciidoc
index c29092cdca..1ff1f5d0a7 100644
--- a/docs/method-monitoring.asciidoc
+++ b/docs/method-monitoring.asciidoc
@@ -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.
diff --git a/docs/setup-javaagent.asciidoc b/docs/setup-javaagent.asciidoc
index 8c90bd833e..025f75ec56 100644
--- a/docs/setup-javaagent.asciidoc
+++ b/docs/setup-javaagent.asciidoc
@@ -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
diff --git a/docs/supported-technologies.asciidoc b/docs/supported-technologies.asciidoc
index 6f6ceccd6e..8e23da8836 100644
--- a/docs/supported-technologies.asciidoc
+++ b/docs/supported-technologies.asciidoc
@@ -28,7 +28,7 @@ Another option is to add a dependency to the agent's <>
 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,
diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc
index baf95f3815..47b5430ea8 100644
--- a/docs/troubleshooting.asciidoc
+++ b/docs/troubleshooting.asciidoc
@@ -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 <> for more details.
 
diff --git a/docs/tuning-and-overhead.asciidoc b/docs/tuning-and-overhead.asciidoc
index 88a8f5c755..d8aaedbbc4 100644
--- a/docs/tuning-and-overhead.asciidoc
+++ b/docs/tuning-and-overhead.asciidoc
@@ -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.