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/windowsperfcountersreceiver] Emit double values instead of integer values #9138

Merged
merged 4 commits into from Apr 11, 2022

Conversation

BinaryFissionGames
Copy link
Contributor

@BinaryFissionGames BinaryFissionGames commented Apr 11, 2022

Description:

  • Emit the scraped float64 values instead of truncating to int64
  • Removed now unused function for initializing the datapoint as double

Link to tracking Issue: #9136

Testing:
Updated unit test to expect double value
Manually tested with this config:

receivers:
  windowsperfcounters:
    collection_interval: 10s
    metrics:
      processor.time:
        description: active and idle time of the processor
        unit: "%"
        gauge:
    perfcounters:
    - object: "Processor Information"
      instances: "*"
      counters:
        - name: "% Processor Time"
          metric: processor.time

exporters:
  logging:
    loglevel: debug

service:
  pipelines:
    metrics:
      receivers: [windowsperfcounters]
      exporters: [logging]

I see datapoints with double values:

NumberDataPoints #4
Data point attributes:
     -> instance: STRING(0,_Total)
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2022-04-11 16:41:18.6038037 +0000 UTC
Value: 0.866840

@project-bot project-bot bot added this to In progress in Collector Apr 11, 2022
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky unit test keeps failing, but this LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Reviewer approved
Development

Successfully merging this pull request may close these issues.

None yet

3 participants