tracing-examples icon indicating copy to clipboard operation
tracing-examples copied to clipboard

Falcon Example

Open konfortes opened this issue 2 years ago • 3 comments

Hey guys, any particular reason the falcon example uses manual instrumentation in the /hello endpoint? It should be automatically instrumented. Am I missing something?

konfortes avatar Nov 08 '22 13:11 konfortes

Do you mean this: https://github.com/signalfx/tracing-examples/blob/11347885f3854fec9d12ed401bfccbad50af6fc2/opentelemetry-tracing/opentelemetry-python-tracing/falcon/main.py#L18 ?

If so, then this is just an example of creating a manual span on top of automatic instrumentation.

pellared avatar Nov 08 '22 14:11 pellared

Yes. I find it confusing since this is a repo with examples of instrumenting Python frameworks. manual instrumentation has its place but probably somewhere else. Having the internal span go along all the span we get from the auto instrumentation also attributes to my confusion.

P.S I came across this example after I wasn't able to automatically instrument my Falcon app and it made me wonder whether I should manually instrument Falcon apps

konfortes avatar Nov 08 '22 14:11 konfortes

I found the issue. My poc wasn't working because I used the code from the example with falcon 3.1 and opentelemetry-instrumentation-falcon 0.33b0. opentelemetry-instrumentation-falcon is only able to instrument when using the App class (instead of the API class which is deprecated in version 3 of falcon).

Opened a PR to update the example I also removed the manual tracing since it is confusing and not compatible with the other examples.

konfortes avatar Nov 10 '22 14:11 konfortes