Skip to content

telemetry: add support for the OTel provider#40032

Merged
istio-testing merged 5 commits intoistio:masterfrom
douglas-reid:opentelemetry-provider
Sep 2, 2022
Merged

telemetry: add support for the OTel provider#40032
istio-testing merged 5 commits intoistio:masterfrom
douglas-reid:opentelemetry-provider

Conversation

@douglas-reid
Copy link
Copy Markdown
Contributor

@douglas-reid douglas-reid commented Jul 21, 2022

This PR adds support for the new OpenTelemetry tracer extension in Envoy. At the same time, it migrates Lightstep providers to the new OpenTelemetry provider (as the Lightstep tracer extension has been removed from Envoy) for future versions of Istio 1.16+.

In pursuit of this goal, the PR also updates the generated tracing config to match envoy documentation (envoy configuration provider name should match envoy extension name), and refactors an existing test suite for OpenCensus agents to also handle OTLP integrations. Additionally, the OTel collector testing component is updated to a more recent version.

To support OTel integrations, an Envoy gRPC endpoint is configured with the cluster name derived from the service/port specification in the provider config.

Issue: #40027

  • Policies and Telemetry

@douglas-reid douglas-reid requested a review from zirain July 21, 2022 01:54
@istio-testing
Copy link
Copy Markdown
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@istio-testing istio-testing added do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 21, 2022
@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jul 22, 2022
@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch from ed81b87 to 9232008 Compare August 11, 2022 21:17
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Aug 11, 2022
@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch 2 times, most recently from c79fb6d to 1ca8b68 Compare August 11, 2022 21:34
@douglas-reid douglas-reid marked this pull request as ready for review August 11, 2022 21:36
@douglas-reid douglas-reid requested a review from a team August 11, 2022 21:36
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Aug 11, 2022
@douglas-reid
Copy link
Copy Markdown
Contributor Author

@smithclay @zirain @howardjohn please take another look. i think this might allow us to support the transition across upgrades, etc.

@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch from 1ca8b68 to 37e911e Compare August 11, 2022 22:05
@douglas-reid douglas-reid requested a review from a team as a code owner August 11, 2022 22:15
@kyessenov
Copy link
Copy Markdown
Contributor

Not all Istio distributions come with all extensions. If you want to be extra strict, you could check node metadata for whether an extension has been compiled-in.

Copy link
Copy Markdown
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

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

overall lgtm

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Aug 15, 2022
@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch from 908fd34 to cf81429 Compare August 30, 2022 17:28
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Aug 30, 2022
@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch 2 times, most recently from 3caa864 to e1f9b6d Compare August 30, 2022 18:14
@douglas-reid douglas-reid requested a review from a team as a code owner August 30, 2022 18:14
@douglas-reid douglas-reid requested a review from a team as a code owner August 31, 2022 17:13
@douglas-reid douglas-reid force-pushed the opentelemetry-provider branch from 9c328cb to f0499c3 Compare September 1, 2022 16:55
Copy link
Copy Markdown
Contributor

@ericvn ericvn left a comment

Choose a reason for hiding this comment

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

Tests and release note looks good

Copy link
Copy Markdown
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

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

lgtm

useOTel := util.IsIstioVersionGE116(model.ParseIstioVersion(meta.IstioVersion))
if useOTel {
tracing, err = buildHCMTracing(pushCtx, envoyOpenTelemetry, provider.Lightstep.Service, provider.Lightstep.Port, provider.Lightstep.MaxTagLength,
func(hostname, clusterName string) (*anypb.Any, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: To be consistent, abstract a function as other provider

could be in a follow up

@istio-testing istio-testing merged commit a8c1e32 into istio:master Sep 2, 2022
// for lightstep for everything before 1.16, but OTel-based configuration for all other cases
useOTel := util.IsIstioVersionGE116(model.ParseIstioVersion(meta.IstioVersion))
if useOTel {
tracing, err = buildHCMTracing(pushCtx, envoyOpenTelemetry, provider.Lightstep.Service, provider.Lightstep.Port, provider.Lightstep.MaxTagLength,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is the provider correct here?
or provider.Opentelemetry.Service, provider.Opentelemetry.Port..?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

see more here #40027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants