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

opentelemetrytracer: Added support to configure a Dynatrace sampler #32598

Merged

Conversation

joaopgrassi
Copy link
Contributor

Commit Message: Added support to configure a Dynatrace sampler

Additional Description: Given the OpenTracing deprecation, Dynatrace customers need a solution to migrate to the OpenTelememetry tracer in Envoy. We have contributed several features needed and the sampler is the last step. Please refer to the linked issue for more information/context.
Risk Level: Low
Testing: Unit, Integration, Manual
Docs Changes: Proto docs generated and verified locally
Release Notes: Added support to configure a Dynatrace sampler
Platform Specific Features: N/A
[Optional Runtime guard:] N/A
[Optional Fixes #32581]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: Thomas Ebner <96168670+samohte@users.noreply.github.com>
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Copy link

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

🐱

Caused by: #32598 was opened by joaopgrassi.

see: more, trace.

SamplerConfigProviderImpl::SamplerConfigProviderImpl(
Server::Configuration::TracerFactoryContext& /*context*/,
const envoy::extensions::tracers::opentelemetry::samplers::v3::DynatraceSamplerConfig& config)
: sampler_config_(config.root_spans_per_minute()) {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our goal is that sampling configuration is obtained in the background from the Dynatrace API, to achieve dynamic sampling.

For this PR we went with this simple approach of returning the value from the configuration. The fetching from the API will be added in a follow up PR.

Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Feb 27, 2024
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @mattklein123

🐱

Caused by: #32598 was synchronize by joaopgrassi.

see: more, trace.

Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

these should be literals - so double backticks please

Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
mattklein123
mattklein123 previously approved these changes Feb 27, 2024
Copy link
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.

Skimmed at a high level and seems fine. Given this is a new opt-in WIP feature I think it's ok to merge and see what issues come up for people that use the feature. Thanks!

@repokitteh-read-only repokitteh-read-only bot removed api deps Approval required for changes to Envoy's external dependencies labels Feb 27, 2024
@mattklein123 mattklein123 enabled auto-merge (squash) February 27, 2024 15:11
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
auto-merge was automatically disabled February 27, 2024 15:47

Head branch was pushed to by a user without write access

@repokitteh-read-only repokitteh-read-only bot added api deps Approval required for changes to Envoy's external dependencies labels Feb 27, 2024
@joaopgrassi
Copy link
Contributor Author

@mattklein123 there was a conflict with the changelog.. solved it now :)

mattklein123
mattklein123 previously approved these changes Feb 27, 2024
@repokitteh-read-only repokitteh-read-only bot removed api deps Approval required for changes to Envoy's external dependencies labels Feb 27, 2024
@mattklein123 mattklein123 enabled auto-merge (squash) February 27, 2024 16:19
@joaopgrassi
Copy link
Contributor Author

/retest

@joaopgrassi
Copy link
Contributor Author

Working to improve the code coverage a bit

Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
auto-merge was automatically disabled February 28, 2024 12:54

Head branch was pushed to by a user without write access

@repokitteh-read-only repokitteh-read-only bot added api deps Approval required for changes to Envoy's external dependencies labels Feb 28, 2024
@joaopgrassi
Copy link
Contributor Author

@mattklein123 need the approval again, sorry. There was issues with code coverage, but we added more tests and should work now. Thanks!

joaopgrassi and others added 3 commits February 28, 2024 18:21
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
Signed-off-by: thomas.ebner <thomas.ebner@dynatrace.com>
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.

opentelemetrytracer: Add Dynatrace sampler
5 participants