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

Add metrics in the exporters and span processors #309

Closed
fbogsany opened this issue Jul 29, 2020 · 2 comments
Closed

Add metrics in the exporters and span processors #309

fbogsany opened this issue Jul 29, 2020 · 2 comments

Comments

@fbogsany
Copy link
Contributor

At least the following metrics are useful.

In exporters:

  • export.failure - counts failed export requests
  • export.success - counts successful export requests
  • export.spans - counts spans successfully exported

In BatchSpanProcessor and SimpleSpanProcessor:

  • dropped_spans - counts spans permanently dropped

Alternatively, hooks could be provided in the span processors and exporters to allow reporting these metrics. E.g. some may wish to log them instead, and indeed we do this currently in an ad-hoc fashion:

def report_result(result_code, batch)
OpenTelemetry.logger.error("Unable to export #{batch.size} spans") unless result_code == SUCCESS
end
and
rescue => e # rubocop:disable Style/RescueStandardError
OpenTelemetry.logger.error("unexpected error in span.on_finish - #{e}")
end

@fbogsany
Copy link
Contributor Author

fbogsany commented Aug 4, 2020

DataDog has a good example of common health metrics that we could also consider for inspiration.

@fbogsany
Copy link
Contributor Author

This has been implemented for the BatchSpanProcessor and the OTLP Exporter:

  • otel.otlp_exporter.request_duration - duration of export request with status label (response code or unknown)
  • otel.otlp_exporter.failure - counts failed export requests with reason label (response code or timeout)
  • otel.bsp.buffer_utilization - observes buffer utilization
  • otel.bsp.export.success - counts successful export requests
  • otel.bsp.exported_spans - counts spans successfully exported
  • otel.bsp.export.failure - counts failed export requests
  • otel.bsp.dropped_spans - counts spans permanently dropped with reason label (export-failure, terminating, buffer-full)

Closing this.

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

No branches or pull requests

1 participant