-
Notifications
You must be signed in to change notification settings - Fork 324
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 WithSpanInstrumentation #3406
Conversation
👋 @videnkz Thanks a lot for your contribution! It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it. Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I only have one minor question about custom annotation in tests.
...lugin/src/test/java/co/elastic/apm/agent/opentelemetry/tracing/ElasticOpenTelemetryTest.java
Outdated
Show resolved
Hide resolved
CHANGELOG.asciidoc
Outdated
@@ -38,6 +38,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes: | |||
* Capture bucket and object key to Lambda transaction as OTel attributes - `aws.s3.bueckt`, `aws.s3.key` - {pull}3364[#3364] | |||
* Added `context_propagation_only` configuration option - {pull}3358[#3358] | |||
* Added attribute[*] for JMX pattern metrics (all metrics can now be generated with `object_name[*:type=*,name=*] attribute[*]`) - {pull}3376[#3376] | |||
* Added support for OpenTelemetry annotations - `WithSpan` and `CaptureAttribute` - {pull}3406[#3406] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is CaptureAttribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jackshirazi ,
My apologize, I fixed name of annotation: CaptureAttribute
-> SpanAttribute
.
We should alter the CoreConfiguration.enablePublicApiAnnotationInheritance description line from
to
|
updated |
@mergify rebase |
❌ Base branch update has failedGit reported the following error:
|
@videnkz needs merging to main and ConfigurationExporterTest run to regenerate docs |
Done |
The test is failing, it doesn't fail locally but it looks like a real failure on CI, class visibility. I don't think I'm going to have time to look at fixing it this week, @videnkz if you have time please do |
I fixed it |
different failure now, again passes locally, failing in CI. Getting no spans for this in ElasticOpenTelemetryTest when executed from OpenTelemetryVersionIT
|
@jackshirazi I did minor fixes in |
@elasticmachine run elasticsearch-ci/docs |
|
||
@Override | ||
public Collection<String> getInstrumentationGroupNames() { | ||
return Collections.singletonList("opentelemetry-annotations"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The returned list should include super.getInstrumentationGroupNames()
: Otherwise this instrumentation would stay enabled even if users added opentelemetry
to the disabled instrumentations config option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
doStaff(); | ||
} | ||
|
||
private void doStaff() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this doStaff()
really required? I think simply empty, annotated methods should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required
@@ -140,4 +140,30 @@ void testUnsupportedMetricsSdkVersionsIgnored(String apiVersion, String sdkVersi | |||
runner.run(); | |||
} | |||
|
|||
@ParameterizedTest | |||
@ValueSource(strings = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think testing with just 1.20.0
should be fine here. The latest version will be run outside of this integration.
There were no changes between 1.20.0
and the latest one on the annotations (I think), so there is no need to spend time on testing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
CHANGELOG.asciidoc
Outdated
@@ -44,6 +44,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes: | |||
* Capture bucket and object key to Lambda transaction as OTel attributes - `aws.s3.bueckt`, `aws.s3.key` - {pull}3364[#3364] | |||
* Added `context_propagation_only` configuration option - {pull}3358[#3358] | |||
* Added attribute[*] for JMX pattern metrics (all metrics can now be generated with `object_name[*:type=*,name=*] attribute[*]`) - {pull}3376[#3376] | |||
* Added support for OpenTelemetry annotations - `WithSpan` and `SpanAttribute` - {pull}3406[#3406] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this up into a new section under the unreleased heading at the top, because 1.44.0 was released in the meantime:
=== Unreleased
[float]
===== Features
* Added support for OpenTelemetry annotations - `WithSpan` and `SpanAttribute` - {pull}3406[#3406]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved
apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
Outdated
Show resolved
Hide resolved
💚 CLA has been signed |
Update apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
Update docs/api-opentelemetry.asciidoc
Update apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java Update docs/api-opentelemetry.asciidoc
bd49c57
to
6623845
Compare
@videnkz I think you need to rerun |
Done |
@elasticmachine run elasticsearch-ci/docs |
@videnkz Thanks for all the time & effort you invested to implement this! ❤️ |
Very nice, thanks! |
What does this PR do?
closes #2753
Added instrumentation for opentelemetry annotation
WithSpan
Checklist
Added an API method or config option? Document in which version this will be introducedTODO:
[x] - support of annotation
WithSpan
[x] - support of annotation
SpanAtribute