Skip to content

Allow specifying samplers for the OpenTelemetry tracer via a new configuration.#30259

Merged
mattklein123 merged 11 commits intoenvoyproxy:mainfrom
dynatrace-oss-contrib:feat/sampler
Oct 30, 2023
Merged

Allow specifying samplers for the OpenTelemetry tracer via a new configuration.#30259
mattklein123 merged 11 commits intoenvoyproxy:mainfrom
dynatrace-oss-contrib:feat/sampler

Conversation

@samohte
Copy link
Copy Markdown
Contributor

@samohte samohte commented Oct 17, 2023

Commit Message: Allow specifying samplers for the OpenTelemetry tracer via a new configuration. Add AlwaysOnSampler as reference implementation.
Additional Description: The OpenTelemetry project defines the concept of a Sampler API. This PR adds a generic interface to allow to implement a sampler which is used in the existing OpenTelemetry tracer. The change allows to add different samplers in the future, e.g. probabilistic sampler, vendor specific sampler, ..
An AlwaysOnSampler is added as reference implementation.
Risk Level: Low
Testing: multiple unit test, no functional
Docs Changes: Added OpenTelemetry Samplers to trace overview page (see change set)
Release Notes: N/A
Platform Specific Features: N/A
Fixes #29578

@repokitteh-read-only
Copy link
Copy Markdown

Hi @samohte, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #30259 was opened by samohte.

see: more, trace.

@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #30259 was opened by samohte.

see: more, trace.

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #30259 was opened by samohte.

see: more, trace.

@samohte samohte force-pushed the feat/sampler branch 2 times, most recently from 75681b0 to 590eb71 Compare October 17, 2023 11:10
…iguration. Add AlwaysOnSampler as reference implementation.

Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>

Signed-off-by: Thomas Ebner <96168670+samohte@users.noreply.github.com>
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
@repokitteh-read-only
Copy link
Copy Markdown

Docs for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-pr/30259/docs/index.html

The docs are (re-)rendered each time the CI envoy-presubmit (precheck docs) job completes.

🐱

Caused by: a #30259 (comment) was created by @samohte.

see: more, trace.

@samohte
Copy link
Copy Markdown
Contributor Author

samohte commented Oct 17, 2023

Sorry for the huge PR. I tried to make the PR as small as possible, but introducing the API without at least one reference implementation does not make much sense. So, I added the API and the AlwaysOnSampler in this PR.

There is a unit test failing in the coverage step. But I think this is not related to my changes.

@joaopgrassi
Copy link
Copy Markdown
Contributor

joaopgrassi commented Oct 19, 2023

@htuch Thomas works with me at Dynatrace, this is the initial/foundation Sampler addition we discussed in Slack.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks LGTM. Can you add some type of integration test for this? Thank you.

/wait

Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
…state

Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
@samohte
Copy link
Copy Markdown
Contributor Author

samohte commented Oct 24, 2023

Thanks LGTM. Can you add some type of integration test for this? Thank you.

/wait

Thanks for your feedback. I have added an integration test following https://github.com/envoyproxy/envoy/blob/main/test/integration/README.md. The test uses the opentelemetry tracer with the AlwaysOnSampler.

@samohte samohte requested a review from mattklein123 October 24, 2023 12:02
samohte and others added 3 commits October 25, 2023 11:54
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
Signed-off-by: Joao Grassi <joao.grassi@dynatrace.com>
@joaopgrassi
Copy link
Copy Markdown
Contributor

@mattklein123 hi! We pushed an integration test. Should be good for another look. Thank you!

@mattklein123
Copy link
Copy Markdown
Member

Can you merge main please?

/wait

Signed-off-by: Joao Grassi <joao.grassi@dynatrace.com>
Signed-off-by: Joao Grassi <joao.grassi@dynatrace.com>
@joaopgrassi
Copy link
Copy Markdown
Contributor

Can you merge main please?

@mattklein123 done!

Signed-off-by: Joao Grassi <joao.grassi@dynatrace.com>
Signed-off-by: Joao Grassi <joao.grassi@dynatrace.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

OpenTelemetry tracer - Hability to configure a custom sampler

3 participants