1、OpenTelemetry技术平台概述技术创新,变革未来Overview and Backwards Compatibility of OpenTracing and OpenCensusBackground: OpenTracing and OpenCensusTracingMetricsLogs, etcInstrumentation APIsforeach(language)Canonical implementationsforeach(language)Data infrastructurecollectors, sidecars, etcInterop formatsw3c tra
2、ce-context, wire formats for trace data, metrics, logs, etcCloud-native telemetryTelemetry “verticals”Telemetry “layers”-One “vertical” (Tracing)-One “layer” (API)-“Looser” coupling (small scope)-Lots of languages (12)-Broad adoption-(FYI: Already part of CNCF)Overlapping but non-identicalOpenCensus
3、-Many “verticals” (Tracing, Metrics)-Many “layers” (API, impl, infra)-“Tighter” coupling (framework-y)-Many languages (5 in beta)-Broad adoption-One “vertical” (Tracing)Users want only one dependency-One “layer” (API)-“Looser” coupling (small scope)-Lots of languages (12)-Broad adoption-(FYI: Alread
4、y part of CNCF)Overlapping but non-identical, and some issuesOpenCensus-Many “verticals” (Tracing, Metrics)-Many “layers” (API, impl, infra)-“Tighter” coupling (framework-y)Users and vendors want flexibility-Many languages (5 in beta)-Broad adoptionBoth widely adopted-370 contributors-5360 stars on
5、GitHub-100s of supported integrations with OSS libraries and frameworksOpenCensus-390 contributors-3392 stars on GitHub-Backed by Google, Microsoft, Omnition, Postmates, Dynatrace, Shopify (soon)So both projects are well-adopted! Great! kinda.No “clear winner” between OpenTracing and OpenCensus-“Lot
6、s of integration” vs “canonical implementation”-Both projects have “escape velocity”Ecosystem confused and visibly held back-Both end-users and vendors-E.g., this Hadoop ecosystem ticket where the choice was irresolvable and all of this made worse by general “negativity bias” on twitter/etcChoice: n
7、ot always a good thing+=OpenCensusOpenTelemetry: the next major versionof both OpenTracing and OpenCensusOpenTelemetry OverviewTracingMetricsLogs, etcInstrumentation APIsforeach(language)Canonical implementationsforeach(language)Data infrastructurecollectors, sidecars, etcInterop formatsw3c trace-co
8、ntext, wire formats for trace data, metrics, logs, etcCloud-native telemetryTelemetry “verticals”Telemetry “layers”Instrumentation APIs-Context propagation, tracing, metrics and correlation between them. Eventually logs-Compatibility with existing OT/OC via bridge-Will rely on and broaden the instru
9、mentation base of OpenTracing/OpenCensusServiceopentel tracing APIMain Applicationopentel library ImplgRPCRedis Client.opentel metrics APICanonical implementationsjaegerprometheusserviceopentel library.-One “reference implementation” for each language-W3C trace-context based context propagation-Open
10、 wire format for tracing, metrics, logs-Data infrastructure (coming).jaegerprometheuscollectorcoolpleectnotre l collectorserviceopentel libraryserviceopentel agentlibraryserviceopentel library-Support for all popular OSSJaegerand commercial backends Application and infrastructure metric collection-F
11、or standalone applications(e.g. Envoy or HBase) the backend can be configured in the agent without recompiling-Tail-based samplingOpenTelemetry Goals-Backwards-compatibility-Backwards-compatibility-Backwards-compatibility-Sept 2019: “Time-to-parity” in major langs-Nov 2019: OpenTracing and OpenCensu
12、s officially sunsetted (i.e., read-only)-Two-year compatibility guaranteeOpenTelemetry Goals: 2019-One project (not two, and def not three!)-Broad surface area (tracing, metrics, APIs, reference impls, sidecars, data formats)-Loose coupling (only take what you need)-Open governance with representati
13、on from many orgsOpenTelemetry Goals: Long-termOpenTelemetry GovernanceOpenTelemetry community membershipA SIG for the cross-language specification SIGs for each languageThree levels of community membership:1.Member: contributor, reviewer2.Approver: experienced reviewer and approver3.Maintainer: set
14、 direction and prioritiesTL;DR edition:-Using CNCF Code of Conduct-Intended to represent many organizations / companies-Elections based on k8s: 9 seats with limits on overrepresentation-Active code contributors get to vote-Maximum term limitsOpenTelemetry governanceBackwards Compatibility:OpenTracin
15、g-Generally, “highly non-abstract” (i.e., in Java its a final class)-TraceIDs and SpanIDs much more prescriptive in OpenTelemetry-based on w3c standard-OpenTracing Baggage via w3cs “correlation-context” concept-In-process context propagation in its own package-Introduces a more formal notion of “sam
16、pling” (actual methods, not just a standard string key like OpenTracing)Changes: SpanContext-A few terminology adjustments, but mostly 1:1 mappings:-OpenTracing “tags” become OpenTelemetry “attributes”-OpenTracing “logs” become OpenTelemetry “events”-OpenTracing “References” become OpenTelemetry “pa
17、rent” Spans that may have varying “kinds” (e.g., Server, Client, Producer, Consumer, Internal)-OpenTelemetry includes an OpenCensus-like “linked Span” concept: otherelements in a batch, etc, etc-User-provided timestamps for Span start/end not part of OpenTels API, though present in wire formats. Can
18、 be added if.f. needed.Changes: Span-Both provide access to the current active Span-OpenTelemetry introduces the concept of a “Resource” that can attach data to every Span created by the Tracer-OpenTelemetry will probably not support Tracer.close(), though itprobably will support Tracer.flush()Chang
19、es: TracerBackwards Compatibility:OpenCensusOpenTelemetry vs OpenCensusClear separation between the instrumentation API specification and the implementation (alternative implementations can be used)A few small changes to the instrumentation APIOpenTelemetry inherits OpenCensus client library impleme
20、ntations with modifications to adhere to the new API specOpenTelemetry inherits the collection infrastructure from OpenCensusTransition plan for OpenCensus libraryserviceoc libraryoc apioc implserviceoc libraryserviceoc libraryopentel libraryopentel implserviceopentel libraryopentel implopentel impl
21、oc apiopentel apioc apiTodayBridgeTransitionEnd Stateopentel apiopentel apiTransition plan for OpenCensus Serviceoc agent / oc collectorjaegerzipkin prometheus opencensusjaegerzipkin prometheus opencensusReceivers -Exporters -serviceserviceserviceserviceserviceserviceTransition plan for OpenCensus S
22、erviceopentel agent / opentel collectorReceivers -Exporters -serviceserviceserviceserviceserviceservicejaegerzipkin prometheus opencensusopentelemetryjaegerzipkin prometheus opencensusopentelemetryTransition plan for OpenCensus Serviceopentel agent / opentel collectorReceivers -Exporters -serviceser
23、viceserviceserviceserviceservicejaegerzipkin prometheus opencensusopentelemetryjaegerzipkin prometheus opencensusopentelemetryTransition plan for OpenCensus Serviceopentel agent / opentel collectorReceivers -Exporters -serviceserviceserviceserviceserviceservicejaegerzipkin prometheus opencensusopentelemetryjaegerzipkin prometheus opencensusopentelemetry谢谢聆听!