opentelemetry-js-contrib icon indicating copy to clipboard operation
opentelemetry-js-contrib copied to clipboard

fix(host-metrics): semcov alignment & macOS fix

Open Netail opened this issue 1 year ago • 24 comments

Which problem is this PR solving?

  • Reduce bundle size by only import the correct function (And so that osx-temp on macOS is not required, as cpu.js of the 'systeminformation' dep isn't even used)
  • Alignment of semconv

Short description of the changes

  • Renamed enum value
  • Use specific file, instead of bundling all file of package

Netail avatar Mar 30 '24 00:03 Netail

I think kafka instrumentation should record cluster-id as a server.address or node host if it can retrieve them. Will bring it up in messaging semconv to decide which one.

The description of server.address in https://opentelemetry.io/docs/specs/semconv/attributes-registry/server/ reads Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. as far as I can tell cluster id does not fit that description.

Kafka instrumentation should do the best effort collecting server.* attributes and if it's not possible should collect some network.* attributes.

Unfortunately, at least to me, it seems that neither of these are easily collectible. For javaagent it is probably possible to get access to network peer with some extra instrumentation, but for library instrumentation this may very well be unattainable.

laurit avatar Feb 23 '24 08:02 laurit

Thanks @laurit !

This is a great feedback to messaging SIG. I agree that it's not trivial. Possible approach could be to let users opt in into getting some info with describe cluster API call or DNS lookup (if we manage to get at least an IP).

lmolkova avatar Feb 23 '24 22:02 lmolkova

Hi, @lmolkova . How is the progress going?

huange7 avatar Apr 09 '24 11:04 huange7

Hi @huange7! We'd welcome a PR for this issue if it's something you're interested in working on.

trask avatar Apr 10 '24 02:04 trask

Hi @huange7! We'd welcome a PR for this issue if it's something you're interested in working on.

Hi, @trask ! I am interested in this issue, and I will attempt to work on it. Please assign to me.

huange7 avatar Apr 10 '24 05:04 huange7