Redirecting otel javaagent logs to instrumented application #13777
-
I'm trying to determine why some of my configured JMX metrics are not being exported. To debug this, I'm trying to set up the javaagent to redirect its logs to the instrumented application's logs. So far, I've set the following environment variables:
Also, I've added this to the instrumented application's logback.yaml file:
When For additional context, I'm starting my application referencing user-defined rules like:
where rules:
- bean: com.datastax.oss.driver:name=cassandra.s0.bytes-sent,type=meters
mapping:
Count:
metric: my.own.cassandra.sent.count
type: counter
MeanRate:
metric: my.own.cassandra.sent.mean
type: gauge
- bean: java.lang:type=Threading
mapping:
ThreadCount:
metric: my.own.jvm.thread.count
type: updowncounter
desc: The current number of threads
unit: "1" The specific issue I'm encountering is that the I've verified that the Cassandra bean exists--it does, see screenshot Given this context, my thought is that I should enable logging to see if the Cassandra bean isn't able to be found (e.g., in BeanFinder). Though, I'm certainly open to any ideas or attention anyone may be able to share to help me resolve this issue. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
From what I can tell, |
Beta Was this translation helpful? Give feedback.
-
Hi ! Thanks for reporting this issue, I have opened #13796 to fix it. With that change the metric should have been reported with an empty string as metric, however I don't know if the backend you use allows that. |
Beta Was this translation helpful? Give feedback.
From what I can tell,
unit
is actually required--when I added unit to the example above, this metric is exported. Note that the document lists this field as optional 🤔