At Tyk, we have recently started our efforts to migrate from OpenTracing to OpenTelemetry. I shared our approach at the Kubernetes Community Days in Munich in October. Here is what we have learned so far. I hope it will be helpful if you are, like us, at the beginning of your observability journey with OpenTelemetry.
See also: https://tyk.io/blog/migrating-from-opentracing-to-opentelemetry/
Migrating from OpenTracing to OpenTelemetry - Kubernetes Community Days Munich 202
1. 1
Is now a good time to migrate
from OpenTracing/OpenCensus
to OpenTelemetry?
Sonja Chevre, Senior Product Manager
Kubernetes Community Days, Munich 2022
4. Who knows OpenTelemetry and feels
confident with distributed tracing?
4
Who uses OpenTelemetry
in production?
5. Mobile application
Web application
API Gateway
Account service
Inventory service
Shipping service
Account DB
Inventory DB
Shipping DB
Web application
API Gateway
Inventory service
Inventory DB
6. Observability platform
Web application
API Gateway
Inventory service
Inventory DB
Web application
OpenTelemetry SDK
API Gateway
OpenTelemetry SDK
Inventory service
OpenTelemetry SDK
Inventory DB
Trace 123
spans
id=123 id=123 id=123
12. What are the options?
1. Bridge OpenTracing API to the
OpenTelemetry SDK
2. OpenTelemetry collector to convert
the traces to OTLP format
3. Start from scratch and rewrite
the whole instrumentation
14. What happens inside an
API Gateway?
Web application
Version check
Rate limit check
Authentication
Requests to upstream APIs
Process responses
Modify response
Inventory
service
Pricing
service
API Gateway
REST
GraphQL
15. What does a deployment
look like?
Web application
Reverse
proxy
API Gateway
API Gateway
API Gateway
16. 5 questions to ask yourself
before (re)instrumenting
your service
16
17. Which context propagation
should you implement?
Web application API Gateway Inventory service
id=123 id=123
Web application API Gateway Inventory service
id=123 trace-id=xw39s
18. 1. W3C Trace-Context
2. Zipkin B3
3. Custom / proprietary (AWS X-Ray)
Context propagation:
the options
Web application API Gateway Inventory service
id=123 trace-id=xw39s
W3C Trace Context ZipKin B3 AWS X-Ray
20. ● User-related attributes
○ Customer segment, customer ID, geo data, device type, OS version
● Software-related attributes
○ Deployment ID, A/B-testing, feature flags, version
● Data-related attributes
○ Request/response size, whether a cache has been used, caching timestamps
● Infrastructure-related attributes
○ Host ID, OS, data centre, orchestration (cluster, pod, or node IDs)
Use attributes that can explain
performance variation
21. You should pay careful
attention to exactly what
data is added to your spans
as they can potentially
contain personally
identifiable information (PII)
Are you exposing PII data?
40. Are you exposing PII data?
You should pay careful
attention to exactly what
data is being added to your
spans, at they can
potentially contain
personally identifiable
information (PII)