opentelemetry-php icon indicating copy to clipboard operation
opentelemetry-php copied to clipboard

SDK should collect OTel metrics by default

Open cedricziel opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Currently, tracing is the most mature signal we use in OTel-PHP. There are other use-cases where metrics are a desired outcome for users to use with analytics backends.

Describe the solution you'd like

Support the canonical metrics:

Describe alternatives you've considered None

Additional context

Some of the metrics are not yet fully specified, but we should probably define first how they are best collected (for example SDK vs extension).

cedricziel avatar Nov 26 '24 14:11 cedricziel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 05:04 stale[bot]

#1614 could aid in one approach to this.

smaddock avatar May 30 '25 04:05 smaddock

Also https://opentelemetry.io/docs/specs/semconv/general/metric-requirement-level/#required states instrumentations must emit required metrics, with > 50% of libraries being compliant. So to me that answers the SDK vs extension question, in that it needs to be both.

smaddock avatar May 30 '25 04:05 smaddock

Also, it’s still in development but there are SDK specific metrics that the SDK should self-report https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/

smaddock avatar May 30 '25 04:05 smaddock

Agree that we should emit more metrics. https://github.com/open-telemetry/opentelemetry-php/pull/1633 adds the semconv for http and otel metrics, so we can use those soon. Chime in on the PR if you think anything else is useful, as I've implemented a very minimal set.

brettmc avatar Jun 13 '25 05:06 brettmc