Coder Social home page Coder Social logo

Comments (3)

rmfitzpatrick avatar rmfitzpatrick commented on September 17, 2024

@jatan28 after looking into this a bit I think the use case you're describing may better match resource attributes than labels for individual points. The metric gatherer uses the autoconfigure sdk extension that provides a property for setting these.

Allowing for arbitrary labels for each datapoint would require wrapping the OTel instrument methods to inject them, and this seems undesirable. The label function feature and labels parameter for recording values should already provide the ability to do this where desired in custom script functionality.

Would it be acceptable for me to add a properties config option in the JMX Receiver that will allow propagating these as system properties?

 jmx/service1:
  jar_path: /home/opentelemetry-java-contrib-jmx-metrics-0.0.1-SNAPSHOT.jar
  endpoint: localhost:9050
  target_system: jvm
  properties: 
     - otel.resource.attributes=my.resource.attr=attrvalue,my.other.resource.attr=othervalue
  collection_interval: 10s

The Collector's configuration library doesn't support case sensitive map keys, so I think this would need to be an array of strings to reduce the potential for unexpected behavior.

from opentelemetry-java-contrib.

jatan28 avatar jatan28 commented on September 17, 2024

@rmfitzpatrick Yes, this solution would solve the problem in hand. With this and a custom groovy script, we should be able to differentiate the jmx metrics

from opentelemetry-java-contrib.

rmfitzpatrick avatar rmfitzpatrick commented on September 17, 2024

@jatan28 appears the Collector contrib project has just released a new version with the added functionality in the JMX receiver: https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.28.0

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver#properties

Thanks for your patience, and if you run into any issues using it please don't hesitate to open an issue in that project.

from opentelemetry-java-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.