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

Perform sampling as explained in the specification. #839

Merged
merged 1 commit into from Sep 9, 2022

Conversation

hdost
Copy link
Contributor

@hdost hdost commented Jul 14, 2022

  • Sampling should always defer to the existing sampler. The logic before
    this patch reflected something similar to what is described in the
    ParentBased sampler.

Relates #800

@hdost hdost requested a review from a team as a code owner July 14, 2022 19:49
@hdost hdost force-pushed the feat/using-samplers-correctly branch from 8971da0 to d3a777a Compare July 14, 2022 19:53
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Base: 66.6% // Head: 66.5% // Decreases project coverage by -0.0% ⚠️

Coverage data is based on head (c91f56d) compared to base (ffe1fbb).
Patch has no changes to coverable lines.

❗ Current head c91f56d differs from pull request most recent head a0f8e04. Consider uploading reports for the commit a0f8e04 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #839     +/-   ##
=======================================
- Coverage   66.6%   66.5%   -0.1%     
=======================================
  Files        113     113             
  Lines       8798    8712     -86     
=======================================
- Hits        5861    5799     -62     
+ Misses      2937    2913     -24     
Impacted Files Coverage Δ
opentelemetry-sdk/src/trace/tracer.rs 92.5% <ø> (+1.5%) ⬆️
opentelemetry-jaeger/src/exporter/config/agent.rs 58.0% <0.0%> (-2.6%) ⬇️
...emetry-jaeger/src/exporter/config/collector/mod.rs 56.5% <0.0%> (-1.8%) ⬇️
opentelemetry-sdk/src/testing/trace.rs 69.3% <0.0%> (-1.2%) ⬇️
opentelemetry-api/src/trace/span_context.rs 87.2% <0.0%> (-1.1%) ⬇️
opentelemetry-jaeger/src/lib.rs 93.0% <0.0%> (-0.4%) ⬇️
opentelemetry-aws/src/lib.rs 89.8% <0.0%> (ø)
opentelemetry-jaeger/src/exporter/config/mod.rs 75.5% <0.0%> (ø)
...aeger/src/exporter/config/collector/http_client.rs 22.5% <0.0%> (ø)
...elemetry-sdk/src/metrics/aggregators/last_value.rs 46.2% <0.0%> (+0.8%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hdost hdost mentioned this pull request Jul 17, 2022
@jtescher
Copy link
Member

@hdost want some help making the last changes? Think this is the only blocker to releasing v0.18

@hdost
Copy link
Contributor Author

hdost commented Aug 16, 2022

@hdost want some help making the last changes? Think this is the only blocker to releasing v0.18

I can push out a change tomorrow 👍🏼

@hdost hdost force-pushed the feat/using-samplers-correctly branch from d3a777a to b395c8b Compare August 17, 2022 17:29
@hdost
Copy link
Contributor Author

hdost commented Aug 17, 2022

Sorry again for the delay on this. All should be good now.

@hdost hdost force-pushed the feat/using-samplers-correctly branch from b395c8b to 91a25da Compare August 17, 2022 17:36
@hdost
Copy link
Contributor Author

hdost commented Aug 17, 2022

Sorry again for the delay on this. All should be good now.

Unsure why i have an issue with msrv...

@djc
Copy link
Contributor

djc commented Aug 17, 2022

Because there was a new release of the h2 library recently, and it requires 1.56. I don't think our 1.49 is tenable anymore, we should just bump to 1.56 like the rest of the ecosystem.

@hdost
Copy link
Contributor Author

hdost commented Aug 18, 2022

Because there was a new release of the h2 library recently, and it requires 1.56. I don't think our 1.49 is tenable anymore, we should just bump to 1.56 like the rest of the ecosystem.

Indeed 😞
@jtescher @TommyCpp what are your thoughts?

@jtescher
Copy link
Member

@jtescher @TommyCpp what are your thoughts?

I'm in favor of going to 1.56 and 2021 edition 👍

@TommyCpp
Copy link
Contributor

Agreed. I think tracing also have a PR to bump the MSRV too

@hdost
Copy link
Contributor Author

hdost commented Aug 22, 2022

Agreed. I think tracing also have a PR to bump the MSRV too

It appears so though it's been open for a month i feel they probably will. , should we open a separate PR for MSRV increase?

@djc
Copy link
Contributor

djc commented Aug 22, 2022

See #866.

@hdost
Copy link
Contributor Author

hdost commented Sep 6, 2022

😢

error: package `async-global-executor v2.3.0` cannot be built because it requires rustc 1.59 or newer, while the currently active rustc version is 1.56.1

@jtescher
Copy link
Member

jtescher commented Sep 6, 2022

@hdost if you merge main you'll pick up the script changes to get MSRV passing again

* Sampling should always defer to the existing sampler. The logic before
  this patch reflected something similar to what is described in the
  ParentBased sampler.
* Maintaining pre-sample to allow for `tracing-opentelemetry` to
  continue working

Relates open-telemetry#800

Signed-off-by: Harold Dost <h.dost@criteo.com>
@hdost hdost force-pushed the feat/using-samplers-correctly branch from 0b207af to a0f8e04 Compare September 8, 2022 13:18
@hdost
Copy link
Contributor Author

hdost commented Sep 9, 2022

Finally! 👍🏼 Things are passing

@jtescher jtescher merged commit 6c1e487 into open-telemetry:main Sep 9, 2022
@hdost hdost deleted the feat/using-samplers-correctly branch September 9, 2022 22:44
jtescher added a commit to tokio-rs/tracing that referenced this pull request Sep 13, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.
@jtescher
Copy link
Member

@hdost if you want to become an approver (requirements) I'm happy to sponsor you, just have open an issue here to get added.

@TommyCpp
Copy link
Contributor

TommyCpp commented Sep 13, 2022

@hdost if you want to become an approver (requirements) I'm happy to sponsor you, just have open an issue here to get added.

+1 if you need another sponsor I can help. Again thanks for all the work on the sampling side!

hawkw pushed a commit to tokio-rs/tracing that referenced this pull request Sep 15, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
jtescher added a commit to tokio-rs/tracing that referenced this pull request Sep 16, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
# Conflicts:
#	.github/workflows/CI.yml
#	tracing-opentelemetry/Cargo.toml
#	tracing-opentelemetry/src/layer.rs
#	tracing-opentelemetry/src/metrics.rs
#	tracing-opentelemetry/tests/metrics_publishing.rs
hawkw added a commit to tokio-rs/tracing that referenced this pull request Sep 16, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
* Update msrv action

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit to tokio-rs/tracing that referenced this pull request Sep 19, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
* Update msrv action

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
liuhaozhan added a commit to liuhaozhan/tracing that referenced this pull request Nov 17, 2022
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
davidbarsky pushed a commit to tokio-rs/tracing-opentelemetry that referenced this pull request Mar 21, 2023
## Motivation

Support the latest OpenTelemetry specification.

## Solution

Update `opentelemetry` to the latest `0.18.x` release. Breaking changes
in the metrics spec have removed value recorders and added histograms so
the metrics layer's `value.` prefix has been changed to `histogram.` and
behaves accordingly. Additionally the `PushController` configuration for
the metrics layer has been simplified to accept a `BasicController` that
can act in either push or pull modes. Finally trace sampling in the
sdk's `PreSampledTracer` impl has been updated to match the sampling
logic in open-telemetry/opentelemetry-rust#839.

* Update MSRV to 1.56
* Update examples
* Fix async-trait dep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants