-
about this documrent: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/writing-instrumentation.md it is clear to me that what is agent instrumentation, basically using Java instrumentation API and bytebuddy build some hack code. like recompile JDK classess and put some mesuring code.(this is what I want to do) but more than just hack(recompile) other library, i have my own library also need mesuring code, so i can use library instrumentation and provider interceptor using OTEL API ? and then my library user could using those API to create they own meter? Hope it's clear what I am asking for. Best Regard. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
After re-reading the contributed markdown, I seem to understand the meaning of library instrumentation. there is two way that create monitor for specific library:
For exmaple:
the developer could write some mesuring code on callback. |
Beta Was this translation helpful? Give feedback.
-
For anyone who has the same problem as me, HikariCP is best example in helping to understand |
Beta Was this translation helpful? Give feedback.
After re-reading the contributed markdown, I seem to understand the meaning of library instrumentation.
there is two way that create monitor for specific library:
For exmaple:
org.apache.kafka.clients.producer.KafkaProducer
has methodFuture<RecordMetadata> send(ProducerRecord<K, V> record, Callback callback)
.the developer could write some mesuring code on callback.