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

wip: added deactivate for Span in public api #1223

Closed
wants to merge 1 commit into from

Conversation

videnkz
Copy link
Contributor

@videnkz videnkz commented Jun 9, 2020

closes #780
[ ] tests
[ ] docs

@apmmachine
Copy link
Contributor

❕ Build Aborted

The PR is not allowed to run in the CI yet

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Pull request #1223 opened]

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

  • Start Time: 2020-06-09T19:00:44.422+0000

  • Duration: 3 min 56 sec

  • Commit: 0bac850

Steps errors

Expand to view the steps failures

  • Name: Error signal
    • Description: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permission

    • Duration: 0 min 0 sec

    • Start Time: 2020-06-09T19:03:36.760+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-09T19:03:11.592Z] Using shallow fetch with depth 3
[2020-06-09T19:03:11.592Z] Pruning obsolete local branches
[2020-06-09T19:03:11.546Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-java.git # timeout=10
[2020-06-09T19:03:11.552Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-06-09T19:03:11.561Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-java.git # timeout=10
[2020-06-09T19:03:11.569Z]  > git rev-parse --verify HEAD # timeout=10
[2020-06-09T19:03:11.578Z] No valid HEAD. Skipping the resetting
[2020-06-09T19:03:11.578Z]  > git clean -fdx # timeout=10
[2020-06-09T19:03:11.593Z] Fetching upstream changes from git@github.com:elastic/apm-agent-java.git
[2020-06-09T19:03:11.593Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2020-06-09T19:03:11.597Z]  > git fetch --no-tags --progress --prune -- git@github.com:elastic/apm-agent-java.git +refs/pull/1223/head:refs/remotes/origin/PR-1223 +refs/heads/master:refs/remotes/origin/master # timeout=15
[2020-06-09T19:03:12.292Z] Merging remotes/origin/master commit 9dc86f0e17c224d72d25388de4480d60105f4bb9 into PR head commit 0bac85062e9b81a29ffe0782e1cd34d995d3dee0
[2020-06-09T19:03:12.856Z] Merge succeeded, producing 59405a1a3db3c9c09f195092c9920529b545426d
[2020-06-09T19:03:12.856Z] Checking out Revision 59405a1a3db3c9c09f195092c9920529b545426d (PR-1223)
[2020-06-09T19:03:12.296Z]  > git config core.sparsecheckout # timeout=10
[2020-06-09T19:03:12.303Z]  > git checkout -f 0bac85062e9b81a29ffe0782e1cd34d995d3dee0 # timeout=15
[2020-06-09T19:03:12.483Z]  > git remote # timeout=10
[2020-06-09T19:03:12.492Z]  > git config --get remote.origin.url # timeout=10
[2020-06-09T19:03:12.497Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2020-06-09T19:03:12.501Z]  > git merge 9dc86f0e17c224d72d25388de4480d60105f4bb9 # timeout=10
[2020-06-09T19:03:12.843Z]  > git rev-parse HEAD^{commit} # timeout=10
[2020-06-09T19:03:12.855Z]  > git config core.sparsecheckout # timeout=10
[2020-06-09T19:03:12.858Z]  > git checkout -f 59405a1a3db3c9c09f195092c9920529b545426d # timeout=15
[2020-06-09T19:03:16.650Z] Commit message: "Merge commit '9dc86f0e17c224d72d25388de4480d60105f4bb9' into HEAD"
[2020-06-09T19:03:16.650Z] First time build. Skipping changelog.
[2020-06-09T19:03:16.650Z] Cleaning workspace
[2020-06-09T19:03:16.716Z]  > git --version # timeout=10
[2020-06-09T19:03:16.725Z] fatal: bad object 9fd1f56f1ad278646e46bccccf8469ee37744bb2
[2020-06-09T19:03:16.648Z]  > git rev-parse --verify HEAD # timeout=10
[2020-06-09T19:03:16.652Z] Resetting working tree
[2020-06-09T19:03:16.652Z]  > git reset --hard # timeout=10
[2020-06-09T19:03:16.671Z]  > git clean -fdx # timeout=10
[2020-06-09T19:03:17.658Z] Masking supported pattern matches of $JOB_GCS_BUCKET or $NOTIFY_TO
[2020-06-09T19:03:17.731Z] Timeout set to expire in 1 hr 0 min
[2020-06-09T19:03:17.760Z] The timestamps step is unnecessary when timestamps are enabled for all Pipeline builds.
[2020-06-09T19:03:18.162Z] [INFO] Number of builds to be searched 10
[2020-06-09T19:03:18.689Z] [INFO] 'shallow' is forced to be disabled when running on PullRequests
[2020-06-09T19:03:18.738Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1223/src/github.com/elastic/apm-agent-java
[2020-06-09T19:03:18.781Z] [INFO] gitCheckout: Checkout SCM PR-1223 with some customisation.
[2020-06-09T19:03:18.813Z] [INFO] Override default checkout
[2020-06-09T19:03:18.875Z] Sleeping for 10 sec
[2020-06-09T19:03:29.028Z] using credential f6c7695a-671e-4f4f-a331-acdce44ff9ba
[2020-06-09T19:03:29.059Z] Cloning the remote Git repository
[2020-06-09T19:03:29.071Z] Cloning repository git@github.com:elastic/apm-agent-java.git
[2020-06-09T19:03:29.095Z]  > git init /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1223/src/github.com/elastic/apm-agent-java # timeout=10
[2020-06-09T19:03:29.127Z] Using reference repository: /var/lib/jenkins/.git-references/apm-agent-java.git
[2020-06-09T19:03:29.127Z] Fetching upstream changes from git@github.com:elastic/apm-agent-java.git
[2020-06-09T19:03:29.127Z]  > git --version # timeout=10
[2020-06-09T19:03:29.138Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2020-06-09T19:03:29.143Z]  > git fetch --tags --progress -- git@github.com:elastic/apm-agent-java.git +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-06-09T19:03:30.893Z] Checking out Revision 0bac85062e9b81a29ffe0782e1cd34d995d3dee0 (origin/PR-1223)
[2020-06-09T19:03:30.084Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-java.git # timeout=10
[2020-06-09T19:03:30.091Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2020-06-09T19:03:30.099Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-java.git # timeout=10
[2020-06-09T19:03:30.106Z] Fetching upstream changes from git@github.com:elastic/apm-agent-java.git
[2020-06-09T19:03:30.106Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2020-06-09T19:03:30.110Z]  > git fetch --tags --progress -- git@github.com:elastic/apm-agent-java.git +refs/pull/1223/head:refs/remotes/origin/PR-1223 +refs/heads/master:refs/remotes/origin/master # timeout=10
[2020-06-09T19:03:30.883Z]  > git rev-parse origin/PR-1223^{commit} # timeout=10
[2020-06-09T19:03:30.891Z]  > git config core.sparsecheckout # timeout=10
[2020-06-09T19:03:30.894Z]  > git checkout -f 0bac85062e9b81a29ffe0782e1cd34d995d3dee0 # timeout=10
[2020-06-09T19:03:31.061Z] Commit message: "added deactivate for Span in public api"
[2020-06-09T19:03:31.061Z] First time build. Skipping changelog.
[2020-06-09T19:03:31.076Z]  > git --version # timeout=10
[2020-06-09T19:03:31.091Z] fatal: bad object 9fd1f56f1ad278646e46bccccf8469ee37744bb2
[2020-06-09T19:03:31.937Z] Masking supported pattern matches of $GIT_USERNAME or $GIT_PASSWORD
[2020-06-09T19:03:32.574Z] + git fetch https://****:****@github.com/elastic/apm-agent-java.git +refs/pull/*/head:refs/remotes/origin/pr/*
[2020-06-09T19:03:33.573Z] Archiving artifacts
[2020-06-09T19:03:34.367Z] + git rev-parse HEAD
[2020-06-09T19:03:34.733Z] + git rev-parse HEAD
[2020-06-09T19:03:35.047Z] + git rev-parse origin/pr/1223
[2020-06-09T19:03:35.102Z] [INFO] githubEnv: Found Git Build Cause: pr
[2020-06-09T19:03:35.360Z] Masking supported pattern matches of $GITHUB_TOKEN
[2020-06-09T19:03:36.330Z] [WARN] githubApiCall: The REST API call https://api.github.com/repos/elastic/apm-agent-java/pulls/1223/reviews return 0 elements
[2020-06-09T19:03:36.399Z] [INFO] githubPrCheckApproved: Title: added deactivate for Span in public api - User: kananindzya - Author Association: CONTRIBUTOR
[2020-06-09T19:03:36.777Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet
[2020-06-09T19:03:36.778Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permissions can do so.)
[2020-06-09T19:03:37.071Z] [INFO] Let's stop build #1. The PR is not allowed to run in the CI yet
[2020-06-09T19:03:37.096Z] Sleeping for 5 sec
[2020-06-09T19:03:38.175Z] Stage "Build" skipped due to earlier failure(s)
[2020-06-09T19:03:38.386Z] Stage "Tests" skipped due to earlier failure(s)
[2020-06-09T19:03:38.599Z] Stage "Unit Tests" skipped due to earlier failure(s)
[2020-06-09T19:03:38.611Z] Stage "Smoke Tests 01" skipped due to earlier failure(s)
[2020-06-09T19:03:38.623Z] Stage "Smoke Tests 02" skipped due to earlier failure(s)
[2020-06-09T19:03:38.634Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2020-06-09T19:03:38.645Z] Stage "Javadoc" skipped due to earlier failure(s)
[2020-06-09T19:03:38.827Z] Failed in branch Unit Tests
[2020-06-09T19:03:38.837Z] Failed in branch Smoke Tests 01
[2020-06-09T19:03:38.845Z] Failed in branch Smoke Tests 02
[2020-06-09T19:03:38.854Z] Failed in branch Benchmarks
[2020-06-09T19:03:38.863Z] Failed in branch Javadoc
[2020-06-09T19:03:39.127Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2020-06-09T19:03:39.219Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-06-09T19:03:39.262Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-06-09T19:03:39.354Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-06-09T19:03:39.698Z] Running on Jenkins in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1223
[2020-06-09T19:03:39.868Z] [INFO] getVaultSecret: Getting secrets
[2020-06-09T19:03:39.940Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-09T19:03:40.920Z] + chmod 755 generate-build-data.sh
[2020-06-09T19:03:40.921Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1223/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1223/runs/1 ABORTED 176229
[2020-06-09T19:03:41.171Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1223/runs/1/steps/?limit=10000 -o steps-info.json

@videnkz videnkz changed the title added deactivate for Span in public api wip: added deactivate for Span in public api Jun 9, 2020
@felixbarny
Copy link
Member

I'm not convinced we should have that API. Wrong Scope management is one of the most common sources of error when doing manual instrumentation. The safest thing is to always use activations in combination with try-with-resources.

@videnkz
Copy link
Contributor Author

videnkz commented Jun 9, 2020

I'm not convinced we should have that API. Wrong Scope management is one of the most common sources of error when doing manual instrumentation. The safest thing is to always use activations in combination with try-with-resources.

Yes, indeed, then I close pr?

@felixbarny
Copy link
Member

Yes, let's to that for now. I'll raise my concerns in the issue (should have done that earlier).

Thanks anyways 🙂

@felixbarny felixbarny closed this Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Span#deactivate to the public API
3 participants