Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastapi instrumentation: add possibility to exclude some routes #147

Closed
guillaume-chervet opened this issue Oct 29, 2020 · 4 comments · Fixed by #237
Closed

fastapi instrumentation: add possibility to exclude some routes #147

guillaume-chervet opened this issue Oct 29, 2020 · 4 comments · Fixed by #237

Comments

@guillaume-chervet
Copy link

Hi,
Thank you for that awesome lib 😊

Jaegger is crumbling under my logs because I have a “/health” route that is called every second on more than 20 services. Is it possible to add the possibility of excluding routes?

Idea exemple :

from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor

@FastAPIInstrumentor.exclude()
@app.get("/health")
async def health():
    return {"status": "OK"}

Or

FastAPIInstrumentor.instrument_app(app, ["/health"])
@lzchen
Copy link
Contributor

lzchen commented Nov 2, 2020

This is a great catch. We have exclude_lists via EXCLUDE_LIST environment variables for a lot of instrumentations but FastAPI is not one of them =p.

@guillaume-thomas
Copy link

Hello !

Thank you for this ! Do you know when the next release will be out ? We'd love to use this feature 👍

Have a nice day !

@srikanthccv
Copy link
Member

From @codeboten on gitter channel

the next release will be going out either today or tomorrow

// @guillaume-thomas

@guillaume-thomas
Copy link

Al right ! Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants