Merged
Conversation
johnbley
approved these changes
Apr 28, 2025
Contributor
johnbley
left a comment
There was a problem hiding this comment.
Thanks so much for this! Sometime soon I'll take a stab at using the new ruleId capability to add more class/method selectors (inherits-from, regex on name, etc.)
|
|
||
| returnValue = | ||
| AsyncOperationEndSupport.create(instrumenter(), Object.class, method.getReturnType()) | ||
| .asyncEnd(context, otelInvocation, returnValue, error); |
| spanStatusBuilder.setStatus(StatusCode.ERROR); | ||
| } | ||
| if (mi.getRule() == null || mi.getRule().getSpanStatus() == null) { | ||
| SpanStatusExtractor.getDefault().extract(spanStatusBuilder, mi, returnValue, error); |
| public static class NocodeAdvice { | ||
| @Advice.OnMethodEnter(suppress = Throwable.class) | ||
| public static void onEnter( | ||
| @RuleId int ruleId, |
breedx-splk
reviewed
Apr 29, 2025
bootstrap/src/main/java/com/splunk/opentelemetry/javaagent/bootstrap/nocode/NocodeRules.java
Show resolved
Hide resolved
breedx-splk
reviewed
Apr 29, 2025
Comment on lines
+40
to
+42
| Map<String, NocodeExpression> attributes = mi.getRuleAttributes(); | ||
| for (String key : attributes.keySet()) { | ||
| String expression = attributes.get(key); | ||
| Object value = NocodeEvaluation.evaluate(expression, mi.getThiz(), mi.getParameters()); | ||
| NocodeExpression expression = attributes.get(key); |
Contributor
There was a problem hiding this comment.
I don't feel super duper strongly about this, but anytime I see iteration over keyset where the first line of the loop is map.get(key) I feel like it just wants to be iterating over the map.entrySet() instead.
breedx-splk
approved these changes
Apr 29, 2025
Contributor
breedx-splk
left a comment
There was a problem hiding this comment.
Had a couple small comments, but seems like progress. 🚀
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.
Bring over some of the changes made during the upstreaming attempt. cc @johnbley