Skip to content

Support the meatada info of the OpenMetrics protocol on prometheus sources #24309

@czd890

Description

@czd890

A note for the community

Use otel to publish the metrics data, and export the metric data as the prometheus protocol(application/openmetrics-text).

# TYPE target info
# HELP target Target metadata
target_info{env="local",region="aws-east-1"} 1
PE otel_scope_info info
# HELP otel_scope_info Scope metadata
otel_scope_info{otel_scope_name="test_scope_name"} 1
# TYPE my_metrics_name counter
my_metrics_name_total{otel_scope_name="test_scope_name",otel_scope_version="1.0.0"} 1 1764209766.399
# EOF

Use Cases

Suppose there are the following two data processing paths:
prometheus <-pull|push-> vector --> sinks(prometheus)
Add a similar to use_otlp_decoding of the opentelemetry source, Would this allow for direct data forwarding without any decoding?

prometheus <-pull|push-> vector --> sinks(otel|datadog|others)
Map the metadata to tags for metrics?

## Vector Metric
{
name: my_metrics_name_total,
tags:{
  env="local",
  region="aws-east-1",
  otel_scope_name="test_scope_name",
  otel_scope_version="1.0.0"
}
}

References

#19656 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureA value-adding code addition that introduce new functionality.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions