Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use spanmetricsprocessor alike to generate metrics from span #17

Closed
futurist opened this issue Mar 13, 2023 · 3 comments
Closed

use spanmetricsprocessor alike to generate metrics from span #17

futurist opened this issue Mar 13, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@futurist
Copy link

Is your feature request related to a problem? Please describe.

Currently the metrics is hard coded into middleware, in below section:

metricsAttributes := extractMetricsAttributesFromSpan(span)

It's not good for extension, and a open-telemetry collector processor can be a good way for the job.

Describe the solution you'd like

Use spanmetricsprocessor or create a new processor for hertz to extract metrics.

@CoderPoet
Copy link
Collaborator

@futurist Very good question, here are some of my considerations

There are some problems with the community's spanmetrics processor:

  1. The generated metrics cannot be used to draw topology, only convert metrics based on a single span, rather than correlating upstream and downstream spans resource.service_name semantics
  2. overhead is too concentrated in collector, the performance of high QPS scenarios is slightly poor
  3. the dimension cache mechanism is easy to cause span loss, which ultimately leads to inaccurate metrics

@CoderPoet
Copy link
Collaborator

@futurist Very good question, here are some of my considerations

There are some problems with the community's spanmetrics processor:

  1. The generated metrics cannot be used to draw topology, only convert metrics based on a single span, rather than correlating upstream and downstream spans resource.service_name semantics
  2. overhead is too concentrated in collector, the performance of high QPS scenarios is slightly poor
  3. the dimension cache mechanism is easy to cause span loss, which ultimately leads to inaccurate metrics

Of course, on the other hand, the metrics instrumentation on the SDK side can be considered to make a pluggable capability

@CoderPoet
Copy link
Collaborator

@futurist Very good question, here are some of my considerations

There are some problems with the community's spanmetrics processor:

  1. The generated metrics cannot be used to draw topology, only convert metrics based on a single span, rather than correlating upstream and downstream spans resource.service_name semantics
  2. overhead is too concentrated in collector, the performance of high QPS scenarios is slightly poor
  3. the dimension cache mechanism is easy to cause span loss, which ultimately leads to inaccurate metrics
  1. It also limits the possibility of SDK-side sampling, and full sampling must be required to accurately calculate the metrics

@li-jin-gou li-jin-gou added the question Further information is requested label May 9, 2023
li-jin-gou pushed a commit to li-jin-gou/obs-opentelemetry that referenced this issue Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants