Issue 1699 extend destination field#1788
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
|
Hey @kananindzya 👋 |
…-destination-field
…-destination-field
…elds from serializaiton. Deleted this field from public api.
apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
Show resolved
Hide resolved
|
Blocked until elastic/apm#436 is finalized |
eyalkoren
left a comment
There was a problem hiding this comment.
Thanks (again) @kananindzya !
Some changes required, mostly minor ones.
Please add tests to verify that the destination.service.resource provide through the API always take precedence, considering that it can be set before or after the resource was automatically set.
apm-agent-api/src/main/java/co/elastic/apm/api/AbstractSpanImpl.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
Outdated
Show resolved
Hide resolved
...apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java
Outdated
Show resolved
Hide resolved
...apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java
Outdated
Show resolved
Hide resolved
...apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java
Outdated
Show resolved
Hide resolved
...ins/apm-api-plugin/src/test/java/co/elastic/apm/agent/pluginapi/SpanInstrumentationTest.java
Outdated
Show resolved
Hide resolved
|
@kananindzya would you like me to take over and apply these minor fixes? |
Hi @eyalkoren, after 30 min I will send changes. |
…-destination-field
eyalkoren
left a comment
There was a problem hiding this comment.
@kananindzya Thanks for the fixes! 🙏
There were some required fixes, including for tests and updating according to the latest spec changes, so I did these changes myself.
If you disagree with something in my latest commits, please let me know.
Thanks!
| @Advice.Argument(1) int port) { | ||
| if (context instanceof Span) { | ||
| SpanContext spanContext = ((Span) context).getContext(); | ||
| if (address != null && !address.isBlank()) { |
There was a problem hiding this comment.
isBlank() is Java 11, we cannot use it
|
|
||
| public boolean hasContent() { | ||
| return resource.length() > 0 || name.length() > 0 || type != null; | ||
| return resource.length() > 0; |
There was a problem hiding this comment.
userResource should be taken into account as well
| */ | ||
| private final StringBuilder resource = new StringBuilder(); | ||
|
|
||
| private final StringBuilder userResource = new StringBuilder(); |
There was a problem hiding this comment.
Must be reset in resetState()
|
Instead of duplicating the properties for user-supplied values, would it be possible to either
|
|
@elasticmachine run elasticsearch-ci/docs |
What does this PR do?
closes #1699
Checklist