Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/mongodbatlas] Process metrics may be emitted on wrong resource #21155

Closed
dehaansa opened this issue Apr 25, 2023 · 2 comments
Closed
Labels
bug Something isn't working needs triage New item requiring triage receiver/mongodbatlas

Comments

@dehaansa
Copy link
Contributor

dehaansa commented Apr 25, 2023

Component(s)

receiver/mongodbatlas

What happened?

Description

The collection path for MongoDBAtlas metrics will emit Process metrics under the first collected Process Database or Process Disk due to issues in the code organization.

the poll method calls extractProcessMetrics to collect Process metrics, but internal to extractProcessMetrics before EmitForResource is called in poll the Database & Disk metrics are collected and EmitForResource'd. Because of this organization, the first Database or Disk to be collected will emit its own metrics and also the Process metrics, causing the Process metrics to be emitted with additional attributes that do not belong.

Steps to Reproduce

Collect MongoDBAtlas metrics from a non-free tier cluster (free tier does not appear to provide disk/database metrics).

Expected Result

Process metrics are emitted without mongodb_atlas.db.name or mongodb_atlas.disk.partition attributes.

Actual Result

Process metrics are usually emitted with the mongodb_atlas.db.name attribute of the first collected database.

Collector version

v0.75.0

Environment information

OpenTelemetry Collector configuration

exporters:
  file:
    path: ./output.json
processors:
receivers:
  mongodbatlas:
    public_key: --
    private_key: --
service:
  pipelines:
    metrics:
      exporters:
      - file
      receivers:
      - mongodbatlas

Log output

No response

Additional context

No response

@dehaansa dehaansa added bug Something isn't working needs triage New item requiring triage labels Apr 25, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@djaglowski
Copy link
Member

Closed by #21156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/mongodbatlas
Projects
None yet
Development

No branches or pull requests

2 participants