Merged
Conversation
… upstream methods instrumentation
Contributor
Author
Thanks for your careful read! It's in much better shape and there were quite a few "this is messy but I'll come back to it later" bits that I had missed. |
laurit
reviewed
Feb 14, 2025
...ode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeInstrumentation.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
...de/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeMethodInvocation.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
...ation/nocode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeModule.java
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
...ation/nocode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeModule.java
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
...e/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeSpanKindExtractor.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
instrumentation/nocode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/JSPS.java
Show resolved
Hide resolved
laurit
reviewed
Feb 14, 2025
...ation/nocode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeModule.java
Show resolved
Hide resolved
breedx-splk
approved these changes
Feb 14, 2025
laurit
reviewed
Feb 17, 2025
...src/test/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeInstrumentationTest.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 17, 2025
bootstrap/src/main/java/com/splunk/opentelemetry/javaagent/bootstrap/nocode/NocodeRules.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 17, 2025
...ode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/NocodeInstrumentation.java
Show resolved
Hide resolved
Let muzzle plugin find helper classes
robsunday
reviewed
Feb 18, 2025
bootstrap/src/main/java/com/splunk/opentelemetry/javaagent/bootstrap/nocode/NocodeRules.java
Outdated
Show resolved
Hide resolved
bootstrap/src/main/java/com/splunk/opentelemetry/javaagent/bootstrap/nocode/NocodeRules.java
Show resolved
Hide resolved
instrumentation/nocode/src/main/java/com/splunk/opentelemetry/instrumentation/nocode/JSPS.java
Show resolved
Hide resolved
robsunday
approved these changes
Feb 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the ability to define
SPLUNK_OTEL_INSTRUMENTATION_NOCODE_YML_FILE=/path/to/some.ymlWhere the yml looks like
And then applies instrumentation to the given methods to create a span around them, with the given name/kind/attributes.
(If this environment variable is not defined, there is no impact/change to the agent in any way).
It borrows heavily from the existing "methods" instrumentation in upstream and could in theory be upstreamed as such, perhaps in reaction to requests like wanting to name the span.
It wound up being fairly easy to throw together - most of the code is pretty straightforward and the
Instrumentationimplementation is able to reuse/adhere to a lot of existing infrastructure for plugging in config-provided elements. I augmented the instrumentation tests with more thorough unit testing of the JSPS expression "parser".One large design topic to be explored is whether to continue using the "JSPS" Java-like expression interpreter or to "buy" an off-the-shelf library for such a thing. This would be a future decision and merging this prototype shouldn't be gated on it - it should be easy enough to swap out that component without touching the rest of the code.
Bikeshedding of all chosen names is welcome!