Include new `service_name` workflow
Changes from have not been reflected in the docs
@@ -2,10 +2,15 @@ import time
from opentelemetry import trace
from opentelemetry.exporter.jaeger import thrift
+from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
-trace.set_tracer_provider(TracerProvider())
+trace.set_tracer_provider(
+ TracerProvider(
+ resource=Resource.create({SERVICE_NAME: "my-helloworld-service"})
+ )
+)
tracer = trace.get_tracer(__name__)
# create a JaegerExporter
