Skip to content

[SCHEMA] The MetricExporter schema is unsafe #109

@marcalff

Description

@marcalff

Currently:

  • there is a unique schema for MetricExporter, which can represent otlp, console, prometheus, or an extension point.
  • a PeriodicMetricReader uses a MetricExporter
  • a PullMetricReader uses a MetricExporter

This is unsafe, because push and pull exporters are mixed in a common schema, which makes it possible to represent:

meter_provider:
  readers:
    - periodic:
        exporter:
          prometheus:
    - pull:
        exporter:
          console:

This is invalid:

  • a periodic exporter is not going to use a prometheus scraper,
  • a pull exporter is now going to use the console to scrape.

Please define instead two separate schemas:

  • PushMetricExporter, which can represent otlp, console, or an extension point,
  • PullMetricExporter, which can represent prometheus, or an extension point,

This also imply that a extension points for PushMetricExporter and PullMetricExporter are different, because they have a different type, which is good.

The component registry will need to expose both types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions