Skip to content

Commit

Permalink
Include new service_name workflow (#1739)
Browse files Browse the repository at this point in the history
Changes from #1669 have not been reflected in the docs
  • Loading branch information
joncwong authored Apr 2, 2021
1 parent 0c0466e commit 7054b53
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

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
Expand Down

0 comments on commit 7054b53

Please sign in to comment.