open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.8k stars 624 forks source link

Getting Started: manual instrumentation, traces, app doesn't run #3544

Closed tigrannajaryan closed 4 months ago

tigrannajaryan commented 11 months ago

Describe your environment Mac OS X Python 3.9.6

Steps to reproduce Follow steps in https://opentelemetry.io/docs/instrumentation/python/getting-started/

What is the expected behavior? App to run.

What is the actual behavior? App fails to start. Output:

  File "app.py", line 5, in <module>
    tracer = trace.get_tracer("diceroller.tracer")
NameError: name 'trace' is not defined

Additional context Part of review https://github.com/open-telemetry/community/issues/1751

app.py attached: app.py.txt

emdneto commented 4 months ago

@lzchen I think this can be closed, right?