Skip to content

Prometheus -> OTLP: Reconsider server resource attributes from scraped endpoints #5146

Description

@dashpole

Originally reported here: #4956 (review) by @cyrille-leclerc

The spec currently has:

| OTLP Resource Attribute | Description |
| ----------------------- | ----------- |
| `server.address` | The `<host>` portion of the target's URL that was scraped |
| `server.port` | The `<port>` portion of the target's URL that was scraped |
| `url.scheme` | `http` or `https` |

This adds resource attributes to scraped metrics based on the endpoint they are scraped from. However, metrics themselves may have their own server.address label.

We should consider:

  • Migrating to prometheus.server.address, prometheus.server.port, and prometheus.url.scheme. This would prevent collisions, while avoiding breaking users too much.
  • Not setting those resource attributes at all. Resource attributes should describe the resource being monitored, not how they are transmitted to the destination. For example, we don't add the OTLP port used when sending OTLP to a collector. Why should scraping be different?

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig-issueA specific SIG should look into this before discussing at the spec

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions