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

added support for adding span destination service info to public api #1551

Conversation

videnkz
Copy link
Contributor

@videnkz videnkz commented Dec 3, 2020

closes #1521

@apmmachine
Copy link
Contributor

apmmachine commented Dec 3, 2020

❕ Build Aborted

The PR is not allowed to run in the CI yet

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: Branch indexing

  • Reason: The PR is not allowed to run in the CI yet

  • Start Time: 2020-12-16T11:39:14.737+0000

  • Duration: 3 min 34 sec

  • Commit: 2cea329

Steps errors 1

Expand to view the steps failures

Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permission

Log output

Expand to view the last 100 lines of log output

[2020-12-16T11:41:21.863Z] Avoid fetching tags
[2020-12-16T11:41:21.888Z] Cloning repository https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:21.932Z]  > git init /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1551 # timeout=10
[2020-12-16T11:41:21.977Z] Using reference repository: /var/lib/jenkins/.git-references/apm-agent-java.git
[2020-12-16T11:41:21.982Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:21.982Z]  > git --version # timeout=10
[2020-12-16T11:41:21.987Z]  > git --version # 'git version 2.17.1'
[2020-12-16T11:41:21.988Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2020-12-16T11:41:21.990Z]  > git fetch --no-tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/heads/*:refs/remotes/origin/* # timeout=15
[2020-12-16T11:41:22.814Z] Pruning obsolete local branches
[2020-12-16T11:41:23.125Z] Merging remotes/origin/master commit 81688c7f993bd460f87d6aa3ccfe18f39f393ffc into PR head commit 2cea3297b42fc6bb627454279a34d98a59c06003
[2020-12-16T11:41:22.772Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2020-12-16T11:41:22.787Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-12-16T11:41:22.801Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2020-12-16T11:41:22.819Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:22.819Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2020-12-16T11:41:22.820Z]  > git fetch --no-tags --progress --prune -- https://github.com/elastic/apm-agent-java.git +refs/pull/1551/head:refs/remotes/origin/PR-1551 +refs/heads/master:refs/remotes/origin/master # timeout=15
[2020-12-16T11:41:23.132Z]  > git config core.sparsecheckout # timeout=10
[2020-12-16T11:41:23.147Z]  > git checkout -f 2cea3297b42fc6bb627454279a34d98a59c06003 # timeout=15
[2020-12-16T11:41:23.806Z] Merge succeeded, producing 38bbcff9c5fc9eeee1de0b43b0c51d86d67b78a0
[2020-12-16T11:41:23.806Z] Checking out Revision 38bbcff9c5fc9eeee1de0b43b0c51d86d67b78a0 (PR-1551)
[2020-12-16T11:41:23.360Z]  > git remote # timeout=10
[2020-12-16T11:41:23.368Z]  > git config --get remote.origin.url # timeout=10
[2020-12-16T11:41:23.373Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2020-12-16T11:41:23.374Z]  > git merge 81688c7f993bd460f87d6aa3ccfe18f39f393ffc # timeout=10
[2020-12-16T11:41:23.799Z]  > git rev-parse HEAD^{commit} # timeout=10
[2020-12-16T11:41:23.809Z]  > git config core.sparsecheckout # timeout=10
[2020-12-16T11:41:23.826Z]  > git checkout -f 38bbcff9c5fc9eeee1de0b43b0c51d86d67b78a0 # timeout=15
[2020-12-16T11:41:27.719Z] Commit message: "Merge commit '81688c7f993bd460f87d6aa3ccfe18f39f393ffc' into HEAD"
[2020-12-16T11:41:27.731Z] First time build. Skipping changelog.
[2020-12-16T11:41:27.722Z]  > git rev-list --no-walk b6bf2ff5eca35d6ed6fac98fedca6ad739c0c24d # timeout=10
[2020-12-16T11:41:28.495Z] Masking supported pattern matches of $JOB_GCS_BUCKET or $NOTIFY_TO
[2020-12-16T11:41:28.548Z] Timeout set to expire in 1 hr 0 min
[2020-12-16T11:41:28.567Z] The timestamps step is unnecessary when timestamps are enabled for all Pipeline builds.
[2020-12-16T11:41:28.789Z] [INFO] Number of builds to be searched 10
[2020-12-16T11:41:29.042Z] [INFO] 'shallow' is forced to be disabled when running on PullRequests
[2020-12-16T11:41:29.058Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1551/src/github.com/elastic/apm-agent-java
[2020-12-16T11:41:29.077Z] [INFO] gitCheckout: Checkout SCM PR-1551 with some customisation.
[2020-12-16T11:41:29.099Z] [INFO] Override default checkout
[2020-12-16T11:41:29.142Z] Sleeping for 10 sec
[2020-12-16T11:41:39.262Z] using credential 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
[2020-12-16T11:41:39.385Z] Cloning the remote Git repository
[2020-12-16T11:41:39.398Z] Cloning repository https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:39.422Z]  > git init /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1551/src/github.com/elastic/apm-agent-java # timeout=10
[2020-12-16T11:41:39.430Z] Using reference repository: /var/lib/jenkins/.git-references/apm-agent-java.git
[2020-12-16T11:41:39.430Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:39.430Z]  > git --version # timeout=10
[2020-12-16T11:41:39.437Z]  > git --version # 'git version 2.17.1'
[2020-12-16T11:41:39.437Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2020-12-16T11:41:39.438Z]  > git fetch --tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-12-16T11:41:39.997Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2020-12-16T11:41:40.001Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-12-16T11:41:40.008Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2020-12-16T11:41:40.021Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2020-12-16T11:41:40.021Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2020-12-16T11:41:40.022Z]  > git fetch --tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/pull/1551/head:refs/remotes/origin/PR-1551 +refs/heads/master:refs/remotes/origin/master # timeout=10
[2020-12-16T11:41:40.339Z] Checking out Revision 2cea3297b42fc6bb627454279a34d98a59c06003 (origin/PR-1551)
[2020-12-16T11:41:40.518Z] Commit message: "minor fixes"
[2020-12-16T11:41:40.518Z] First time build. Skipping changelog.
[2020-12-16T11:41:40.334Z]  > git rev-parse origin/PR-1551^{commit} # timeout=10
[2020-12-16T11:41:40.341Z]  > git config core.sparsecheckout # timeout=10
[2020-12-16T11:41:40.345Z]  > git checkout -f 2cea3297b42fc6bb627454279a34d98a59c06003 # timeout=10
[2020-12-16T11:41:41.467Z] Masking supported pattern matches of $GIT_USERNAME or $GIT_PASSWORD
[2020-12-16T11:41:42.075Z] + git fetch https://****:****@github.com/elastic/apm-agent-java.git +refs/pull/*/head:refs/remotes/origin/pr/*
[2020-12-16T11:41:43.068Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1551/src/github.com/elastic/apm-agent-java/.git
[2020-12-16T11:41:43.087Z] Archiving artifacts
[2020-12-16T11:41:43.893Z] + git rev-parse HEAD
[2020-12-16T11:41:44.247Z] + git rev-parse HEAD
[2020-12-16T11:41:44.546Z] + git rev-parse origin/pr/1551
[2020-12-16T11:41:44.581Z] [INFO] githubEnv: Found Git Build Cause: pr
[2020-12-16T11:41:44.934Z] Masking supported pattern matches of $GITHUB_TOKEN
[2020-12-16T11:41:46.054Z] [INFO] githubPrCheckApproved: Title: added support for adding span destination service info to public api - User: kananindzya - Author Association: CONTRIBUTOR
[2020-12-16T11:41:46.291Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet
[2020-12-16T11:41:46.291Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permissions can do so.)
[2020-12-16T11:41:46.318Z] [INFO] Let's stop build #8. The PR is not allowed to run in the CI yet
[2020-12-16T11:41:46.329Z] Sleeping for 5 sec
[2020-12-16T11:41:47.401Z] Stage "Build" skipped due to earlier failure(s)
[2020-12-16T11:41:47.473Z] Stage "Tests" skipped due to earlier failure(s)
[2020-12-16T11:41:47.534Z] Stage "Unit Tests" skipped due to earlier failure(s)
[2020-12-16T11:41:47.535Z] Stage "Smoke Tests 01" skipped due to earlier failure(s)
[2020-12-16T11:41:47.536Z] Stage "Smoke Tests 02" skipped due to earlier failure(s)
[2020-12-16T11:41:47.536Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2020-12-16T11:41:47.537Z] Stage "Javadoc" skipped due to earlier failure(s)
[2020-12-16T11:41:47.618Z] Failed in branch Unit Tests
[2020-12-16T11:41:47.619Z] Failed in branch Smoke Tests 01
[2020-12-16T11:41:47.619Z] Failed in branch Smoke Tests 02
[2020-12-16T11:41:47.620Z] Failed in branch Benchmarks
[2020-12-16T11:41:47.620Z] Failed in branch Javadoc
[2020-12-16T11:41:47.693Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2020-12-16T11:41:47.734Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-12-16T11:41:47.750Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-12-16T11:41:48.013Z] Running on Jenkins in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1551
[2020-12-16T11:41:48.123Z] [INFO] getVaultSecret: Getting secrets
[2020-12-16T11:41:48.492Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-12-16T11:41:49.167Z] + chmod 755 generate-build-data.sh
[2020-12-16T11:41:49.167Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1551/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1551/runs/8 ABORTED 154167
[2020-12-16T11:41:49.717Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1551/runs/8/steps/?limit=10000 -o steps-info.json
[2020-12-16T11:41:50.268Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1551/runs/8/tests/?status=FAILED -o tests-errors.json
[2020-12-16T11:41:50.518Z] Retry 1/3 exited 22, retrying in 1 seconds...
[2020-12-16T11:41:51.430Z] Retry 2/3 exited 22, retrying in 2 seconds...

@videnkz videnkz marked this pull request as draft December 3, 2020 06:35
@videnkz videnkz marked this pull request as ready for review December 3, 2020 07:34

@Nonnull
@Override
public Span withDestinationServiceResource(String resource) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I think we're hitting some limits with how we modelled spans and transactions here. These methods are only relevant for spans, not transactions. But in the public API, transaction extends span. We should think about introducing a BaseSpan that contains methods that are relevant for both spans and transactions. But that would likely break binary compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @felixbarny , please review changes

@videnkz videnkz requested a review from felixbarny December 4, 2020 05:30
@codecov-io
Copy link

codecov-io commented Dec 9, 2020

Codecov Report

Merging #1551 (f505ce2) into master (b92ab24) will decrease coverage by 0.02%.
The diff coverage is 84.61%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1551      +/-   ##
============================================
- Coverage     59.00%   58.98%   -0.03%     
- Complexity       92     2309    +2217     
============================================
  Files           391      391              
  Lines         17622    17615       -7     
  Branches       2441     2436       -5     
============================================
- Hits          10398    10390       -8     
- Misses         6505     6508       +3     
+ Partials        719      717       -2     
Impacted Files Coverage Δ Complexity Δ
.../micrometer/MicrometerMeterRegistrySerializer.java 95.53% <84.61%> (+1.41%) 0.00 <0.00> (ø)
...iguration/PrefixingConfigurationSourceWrapper.java 50.00% <0.00%> (-16.67%) 3.00% <0.00%> (+3.00%) ⬇️
...agent/report/serialize/MetricRegistryReporter.java 86.66% <0.00%> (-6.67%) 4.00% <0.00%> (+4.00%) ⬇️
...lastic/apm/agent/impl/ElasticApmTracerBuilder.java 73.33% <0.00%> (-4.45%) 20.00% <0.00%> (+20.00%) ⬇️
...ration/source/PropertyFileConfigurationSource.java 32.89% <0.00%> (-2.64%) 10.00% <0.00%> (+10.00%) ⬇️
...nt/configuration/ApmServerConfigurationSource.java 76.66% <0.00%> (-1.12%) 21.00% <0.00%> (+21.00%) ⬇️
...tic/apm/agent/report/ssl/TLSFallbackSSLSocket.java 39.13% <0.00%> (+1.44%) 20.00% <0.00%> (+20.00%)
...ic/apm/agent/profiler/collections/LongHashSet.java 17.85% <0.00%> (+1.98%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b92ab24...2cea329. Read the comment docs.

@SylvainJuge SylvainJuge added api Public API new-feature New feature labels Mar 1, 2021
@eyalkoren
Copy link
Contributor

@kananindzya I am closing this as I believe this is superseded by #1788 .
If I am wrong, please feel free to reopen.

@eyalkoren eyalkoren closed this Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java api Public API new-feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for adding span destination via public API
6 participants