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

doc(opentelemetry): use histogram for metrics #2326

Merged
merged 2 commits into from
Sep 30, 2022

Conversation

nmoutschen
Copy link
Contributor

Motivation

This fixes a discrepancy in the tracing-opentelemetry docs for the new MetricsLayer. The docs refer to value. as a way to collect discrete data point, but this doesn't match any of the prefix constant mentioned in the same file.

const METRIC_PREFIX_MONOTONIC_COUNTER: &str = "monotonic_counter.";
const METRIC_PREFIX_COUNTER: &str = "counter.";
const METRIC_PREFIX_HISTOGRAM: &str = "histogram.";

Solution

This fixes the documentation and test by referring to histogram. instead of value..

@nmoutschen nmoutschen requested review from jtescher and a team as code owners September 27, 2022 13:01
@jtescher jtescher added the crate/opentelemetry Related to the `tracing-opentelemetry` crate. label Sep 29, 2022
Copy link
Collaborator

@jtescher jtescher left a comment

Choose a reason for hiding this comment

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

Yep looks like a few docs got missed in the update. Thanks @nmoutschen

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

looks good to me!

i'm surprised the tests didn't fail previously due to the use of the wrong prefix. that might be worth looking into...

@hawkw hawkw merged commit 1215ab2 into tokio-rs:master Sep 30, 2022
hawkw pushed a commit that referenced this pull request Sep 30, 2022
#2326)

## Motivation

This fixes a discrepancy in the `tracing-opentelemetry` docs for the new
MetricsLayer. The docs refer to `value.` as a way to collect discrete
data point, but this doesn't match any of the prefix constant mentioned
in the same file.

```rust
const METRIC_PREFIX_MONOTONIC_COUNTER: &str = "monotonic_counter.";
const METRIC_PREFIX_COUNTER: &str = "counter.";
const METRIC_PREFIX_HISTOGRAM: &str = "histogram.";
```

## Solution

This fixes the documentation and test by referring to `histogram.`
instead of `value.`.
hawkw pushed a commit that referenced this pull request Sep 30, 2022
#2326)

## Motivation

This fixes a discrepancy in the `tracing-opentelemetry` docs for the new
MetricsLayer. The docs refer to `value.` as a way to collect discrete
data point, but this doesn't match any of the prefix constant mentioned
in the same file.

```rust
const METRIC_PREFIX_MONOTONIC_COUNTER: &str = "monotonic_counter.";
const METRIC_PREFIX_COUNTER: &str = "counter.";
const METRIC_PREFIX_HISTOGRAM: &str = "histogram.";
```

## Solution

This fixes the documentation and test by referring to `histogram.`
instead of `value.`.
@nmoutschen nmoutschen deleted the doc-otel-metrics branch October 4, 2022 07:34
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
tokio-rs#2326)

## Motivation

This fixes a discrepancy in the `tracing-opentelemetry` docs for the new
MetricsLayer. The docs refer to `value.` as a way to collect discrete
data point, but this doesn't match any of the prefix constant mentioned
in the same file.

```rust
const METRIC_PREFIX_MONOTONIC_COUNTER: &str = "monotonic_counter.";
const METRIC_PREFIX_COUNTER: &str = "counter.";
const METRIC_PREFIX_HISTOGRAM: &str = "histogram.";
```

## Solution

This fixes the documentation and test by referring to `histogram.`
instead of `value.`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants