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

TraceZ page in opentelemetry-cpp

Open liadavid opened this issue 4 years ago • 6 comments

Is your feature request related to a problem?

ZPages are web-pages that display general and debugging information on processes. Tracez provides details about the trace spans in the process. Currently there are few WIP projects to add zPages to OpenTelemetry, following the zPages spec/general direction. We would like to add a Tracez zPage to the OpenTelemetry-CPP package.

Describe the solution you'd like

The tracez page should include:

  • Aggregated statistics about all current Spans.
  • Span samples that provide additional attributes and are chosen based on errors/latency.

Scope and requirements:

  • Render a Tracez page in-proc.
  • Integrate with the current C++ SDK (Specifically through TracerProvider).
  • Code is added under 'ext/'.

High level design TraceZ architecture is divided into the following components:

  • TraceZSpanProcessor design - is responsible for extracting the spans from the process and propagate them to TracezDataAggregator. Implements SpanProcessor interface.
  • TracezDataAggregator design - this component performs the needed aggregations on the data propagated by the TraceZSpanProcessor. Possible aggregations are: distribution of latencies for each span, number of spans with errors vs. total count of spans (per unit of time). The aggregator will also be responsible for storing additional attributes for a few Span samples.
  • Data rendering logic design(draft) - provides the statistics and aggregations to the developer.

Describe alternatives you've considered

  • Integrate TraceZ directly with API layer instead of SDK.
  • Out of proc data rendering logic.

Both alternatives are good extensions for the MVP defined above. Another possible extension is to add a Tracez Sampler component that will enable the developer to determine the sampling ratio of traces shown/aggregated in TraceZ.

Additional context

README

Open Questions

  • SpanProcessor interface accepts Recordable. Following the interface, should TraceZSpanProcessor accept Recordable as well? If yes, can we add getter functions to the Recordable interface?

liadavid avatar Jul 09 '20 17:07 liadavid

SpanProcessor interface accepts Recordable. Following the interface, should TraceZSpanProcessor accept Recordable as well? If yes, can we add getter functions to the Recordable interface?

No, we don't want to add getters to the Recordable interface and force every vendor to implement it. You can either:

  • Use the existing SpanData. It derives from Recordable and has getters. You can then cast from Recordable to SpanData in the processor.
  • Implement your own class deriving from Recordable and implementing getters. You can then cast from Recordable to your derived class in the processor.

pyohannes avatar Jul 09 '20 18:07 pyohannes

SpanProcessor interface accepts Recordable. Following the interface, should TraceZSpanProcessor accept Recordable as well? If yes, can we add getter functions to the Recordable interface?

No, we don't want to add getters to the Recordable interface and force every vendor to implement it. You can either:

  • Use the existing SpanData. It derives from Recordable and has getters. You can then cast from Recordable to SpanData in the processor.
  • Implement your own class deriving from Recordable and implementing getters. You can then cast from Recordable to your derived class in the processor.

Thanks Johannes for the explanation regarding Recordable.

liadavid avatar Jul 09 '20 19:07 liadavid

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

github-actions[bot] avatar Dec 03 '21 01:12 github-actions[bot]

Closed as inactive. Feel free to reopen if this is still an issue.

github-actions[bot] avatar Dec 11 '21 01:12 github-actions[bot]

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

github-actions[bot] avatar Feb 09 '22 01:02 github-actions[bot]

Closed as inactive. Feel free to reopen if this is still an issue.

github-actions[bot] avatar Feb 16 '22 01:02 github-actions[bot]

Closing, as zpages is removed, see #2292

marcalff avatar Dec 05 '23 23:12 marcalff