Skip to content

GetMetricMetadata returns no type for distribution metric #2987

@rrey

Description

@rrey

Describe the bug

The GetMetricMetadata endpoint returns an empty object for a Distribution that was just emitted.
For a Counter metric, the endpoint will return a minimal object with type specified. I expected to have the distribution type provided.

To Reproduce
Steps to reproduce the behavior:

Using the samples from the doc (edit the metric names)

  1. Emit a distribution point: https://docs.datadoghq.com/api/latest/metrics/?code-lang=go#submit-distribution-points
  2. Emit a Counter : (edited the metric type to datadogV2.METRICINTAKETYPE_COUNT.Ptr(): https://docs.datadoghq.com/api/latest/metrics/?code-lang=go#submit-metrics
  3. Call metric metadata endpoint for the 2 metrics.
  4. See the outputs:

For the counter:

Response from `MetricsApi.GetMetricMetadata`:
{
  "type": "count"
}

For the Distribution:

Response from `MetricsApi.GetMetricMetadata`:
{}

Expected behavior
For the distribution I would expect a distribution type:

Response from `MetricsApi.GetMetricMetadata`:
{
  "type": "distribution"
}

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugBug related issuestaleStale - Bot reminder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions