Sharing common schema and code
Consistent telemetry reporting applies to telemetry collection configuration. First, we need to enable a basic layer of instrumentation on all services, which should include resource utilization metrics, traces, and metrics for HTTP, gRPC, or any other RPC protocol used in your system.
We should also configure sampling and resource attributes, add enrichment processors, and set up context propagators.
Individual services should be able to customize configuration to some extent: add more instrumentations, enable custom activity sources and meters, or control log verbosity.
The easiest way to unify configuration is to ship corresponding code as a common library (or a set of them) shared across all the services in your system. Such libraries would define configuration options, provide helper methods to enable telemetry collection, implement common enrichment processors, declare cross-service events, and so on. Let’s go ahead and implement...