Skip to content

Add JmxMetrics extension#1523

Closed
rmfitzpatrick wants to merge 3 commits intoopen-telemetry:masterfrom
signalfx:jmx-metrics
Closed

Add JmxMetrics extension#1523
rmfitzpatrick wants to merge 3 commits intoopen-telemetry:masterfrom
signalfx:jmx-metrics

Conversation

@rmfitzpatrick
Copy link
Copy Markdown

These additions provide a convenient method of creating metrics from queried MBeans in custom groovy scripts. Currently only synchronous instruments are supported, though the plan is to provide asynchronous helpers in the near future.

$ java -cp <opentelemetry-java jars> io.opentelemetry.extensions.metrics.jmx.JmxMetrics -config ./config.json
```

##### `config.json` example
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use Java properties and allow them to be specified on the command line? It may be easier for some cases instead of having to generate a file? e.g. java -jar whatever.jar -Dotel.intervalSeconds=5. Could also use properties file instead of having to include dependencies.

@jkwatson
Copy link
Copy Markdown
Contributor

This looks interesting, but I think it would be better as a contribution to the instrumentation project, rather than the API/SDK itself. The instrumentation project is here: https://github.com/open-telemetry/opentelemetry-java-instrumentation

@rmfitzpatrick
Copy link
Copy Markdown
Author

@jkwatson considering this isn't using bytebuddy or generating trace data is introducing metric helpers an overall intention of that project? This seems closer to the current runtime metric extension than anything in java-instrumentation.

@jkwatson
Copy link
Copy Markdown
Contributor

@jkwatson considering this isn't using bytebuddy or generating trace data is introducing metric helpers an overall intention of that project? This seems closer to the current runtime metric extension than anything in java-instrumentation.

We're actually planning on moving the runtime metrics over to the instrumentation repo. It includes (or will include) both auto-and-non-auto instrumentation code.

@jkwatson
Copy link
Copy Markdown
Contributor

It's a little hidden over in the instrumentation repo, but this document outlines the scope for that repo: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/master/docs/scope.md

We should probably add something similar over here!

@rmfitzpatrick
Copy link
Copy Markdown
Author

@jkwatson thanks, will port this over. Did you happen to have a prepared location for things like this or is ~/instrumentation/jmx-metrics fine?

@jkwatson
Copy link
Copy Markdown
Contributor

I would ask in https://gitter.im/open-telemetry/opentelemetry-java-instrumentation. I don't spend much time over in that repo yet, but the folks in that channel would definitely have the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants