Problematy / goodmap

MIT License
2 stars 10 forks source link

Try out bringing open-telemetry into project #119

Open Dawid-Sroka opened 2 months ago

Dawid-Sroka commented 2 months ago

This draft PR contains what I managed to try out from open-telemetry.

Basically I did what was in written in this documentation: https://opentelemetry.io/docs/languages/python/getting-started/ up until the "Traces" subsection.

  1. I confirmed that following the steps in "Run the instrumented app" and invoking:
    poetry run opentelemetry-instrument \
    --traces_exporter console \
    --metrics_exporter console \
    --logs_exporter console \
    --service_name goodmap \
    poetry run flask --app  'goodmap.goodmap:create_app(config_path="./tests/e2e_tests/e2e_test_config.yml")' run 

    indeed does something, doesn't exit with error and prints output from open-telemetry. Some of these outputs seem strange, e.g. the one with "body": "Instrumenting of aws-lambda failed"

  2. I added a simple tracer and a span like in "Traces" subsection. Then this span was also visible in the output of the command above. It contains timestamps and I managed to observe that when loading big json data like this, the elapsed time was about 1/2 seconds.

In open-telemetry nomenclature: