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

[EXAMPLES] Fix view names in Prometheus example #2034

Merged
merged 6 commits into from
Mar 16, 2023

Conversation

tyler92
Copy link
Contributor

@tyler92 tyler92 commented Mar 9, 2023

As far as I can see View should have the same name as Instrument

The name of the View (optional). If not provided, the Instrument name MUST be used by default. This will be used as the name of the metrics stream.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#view

@tyler92 tyler92 requested a review from a team March 9, 2023 07:21
@tyler92
Copy link
Contributor Author

tyler92 commented Mar 9, 2023

I am a newcomer in OpenTelemetry so please let me know if I am wrong and if there is no error in the examples. Without this change I don't see "_counter" on the Prometheus page.

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #2034 (e8b7914) into main (2462f7c) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2034   +/-   ##
=======================================
  Coverage   87.32%   87.32%           
=======================================
  Files         166      166           
  Lines        4723     4723           
=======================================
  Hits         4124     4124           
  Misses        599      599           

@esigo esigo added the size/XS Denotes a PR that changes 0-9 lines. label Mar 9, 2023
@esigo esigo self-assigned this Mar 9, 2023
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Changes look good. Thanks for the contribution.

@tyler92
Copy link
Contributor Author

tyler92 commented Mar 10, 2023

If the change is good, I will change also README with pictures. And revome WIP after that. Right now I wanted to make sure that the fix is correct

@tyler92
Copy link
Contributor Author

tyler92 commented Mar 12, 2023

Why don't I see a picture like in README? I see lines instead of histograms. Where is a mistake?

image

@lalitb
Copy link
Member

lalitb commented Mar 13, 2023

@tyler92 In case you are seeing a separate line for each histogram bucket, the output is correct. The existing screenshot in README.md is from the previous implementation (prior to design changes in #1953), and is no longer valid output.

@tyler92 tyler92 changed the title [WIP] Fix view names in Prometheus example Fix view names in Prometheus example Mar 14, 2023
@lalitb lalitb enabled auto-merge (squash) March 16, 2023 05:40
@lalitb lalitb merged commit e0a85f2 into open-telemetry:main Mar 16, 2023
@marcalff marcalff changed the title Fix view names in Prometheus example [EXAMPLES] Fix view names in Prometheus example Apr 12, 2023
ays7 added a commit to ays7/opentelemetry-cpp that referenced this pull request May 18, 2023
* commit '7887d32da60f54984a597abccbb0c883f3a51649': (82 commits)
  [RELEASE] Release version 1.9.0 (open-telemetry#2091)
  Use sdk_start_ts for MetricData start_ts for instruments having cumulative aggregation temporality. (open-telemetry#2086)
  [SEMANTIC CONVENTIONS] Upgrade to version 1.20.0 (open-telemetry#2088)
  [EXPORTER] Add OTLP HTTP SSL support (open-telemetry#1793)
  Make Windows build environment parallel (open-telemetry#2080)
  make some hints (open-telemetry#2078)
  Make some targets parallel in CI pipeline (open-telemetry#2076)
  [Metrics SDK] Implement Forceflush for Periodic Metric Reader (open-telemetry#2064)
  Upgraded semantic conventions to 1.19.0 (open-telemetry#2017)
  Bump actions/stale from 7 to 8 (open-telemetry#2070)
  Include directory path added for Zipkin exporter example (open-telemetry#2069)
  Ignore more warning of generated protobuf files than not included in `-Wall` and `-Wextra` (open-telemetry#2067)
  Add `ForceFlush` for all `LogRecordExporter`s and `SpanExporter`s. (open-telemetry#2000)
  Remove unused 'alerting' section from prometheus.yml in examples (open-telemetry#2055)
  Clean warnings in ETW exporters (open-telemetry#2063)
  Fix default value of `OPENTELEMETRY_INSTALL_default`. (open-telemetry#2062)
  [EXPORTER] GRPC endpoint scheme should take precedence over OTEL_EXPORTER_OTLP_TRACES_INSECURE (open-telemetry#2060)
  Fix view names in Prometheus example (open-telemetry#2034)
  Fix some docs typo (open-telemetry#2057)
  Checking indices before dereference (open-telemetry#2040)
  ...

# Conflicts:
#	exporters/ostream/CMakeLists.txt
#	sdk/src/metrics/state/metric_collector.cc
#	sdk/src/metrics/state/temporal_metric_storage.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants