Kafka connect metadata#15021
Conversation
| if (resource == null) { | ||
| return; | ||
| } | ||
| String path = Paths.get(resource.getPath()).toString(); |
There was a problem hiding this comment.
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.
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.
yes, with the change in the way we are now getting the path, the result is different now
There was a problem hiding this comment.
how are you thinking to use the telemetry emitted from the smoke tests?
There was a problem hiding this comment.
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.