Improve OTel Histogram Performance

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The OpenTelemetry Histogram Implementation uses the SyncMetricStorage class, which takes a SpinLock on each update (https://github.com/open-telemetry/opentelemetry-cpp/blob/2868dd1332f364f08d9b6e4c46c210d98e031e1f/sdk/include/opentelemetry/sdk/metrics/state/sync_metric_storage.h#L101) in order to manage dynamically configurable attributes, which shouldn't be needed for our use case.

      This ticket entails investigating how to modify the OTel library to avoid this performance hit on Histogram::record calls.

      I've attatched a flamegraph showing ycsb100_read with a single otel Histogram added in handleRequest. Search otel::metrics::Histogram to see the relevant stacks here.

            Assignee:
            Unassigned
            Reporter:
            Erin McNulty
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: