-
Notifications
You must be signed in to change notification settings - Fork 1k
Kafka connect metadata #15021
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
Kafka connect metadata #15021
Conversation
| if (resource == null) { | ||
| return; | ||
| } | ||
| String path = Paths.get(resource.getPath()).toString(); |
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.
This won't work when the path contains spaces as in url they'd be encoded as %20. resource.toURI().getPath() should fix that. To me using this.getClass().getClassLoader().getResource("") feels a bit random as it is hard to explain why it should do what you want. It isn't really well defined what class loaders should return for "" and it happening to be the first directory in app loader not something from the parent loader feels more like a coincidence. Idk, maybe new java.io.File("").getAbsoluteFile() wold also work.
| private static final String TMP_DIR = ".telemetry"; | ||
| private static final Pattern MODULE_PATTERN = | ||
| Pattern.compile("(.*?/instrumentation/.*?)(/javaagent/|/library/)"); | ||
| Pattern.compile("(.*?/instrumentation/.*?)(/javaagent|/library|/testing)"); |
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.
or was remove the trailing / intentional?
| Pattern.compile("(.*?/instrumentation/.*?)(/javaagent|/library|/testing)"); | |
| Pattern.compile("(.*?/instrumentation/.*?)(/javaagent/|/library/|/testing/)"); |
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.
yes, with the change in the way we are now getting the path, the result is different now
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/LibraryTestRunner.java
Outdated
Show resolved
Hide resolved
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/AgentTestRunner.java
Outdated
Show resolved
Hide resolved
smoke-tests/src/main/java/io/opentelemetry/smoketest/SmokeTestRunner.java
Outdated
Show resolved
Hide resolved
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.
how are you thinking to use the telemetry emitted from the smoke tests?
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.
kafka connect only runs smoke tests, so this was the only way to get that telemetry. I don't think there will be too many other instrumentations this is needed for
…emetry-java-instrumentation into kafka-connect-metadata
No description provided.