Instrumentation
Instrumentation is the technical jargon for adding observability to and in your code.
IUDEX provides a variety of utilities to help you track whats important to you.
Autoinstrumentation
Like its name implies, autoinstrumentation is the automatic addition of observability to your code. This is especially important to get a pulse on code you donβt own, like libraries and frameworks.
IUDEX autoinstruments several popular frameworks and libraries out of the box.
Supported popular frameworks, tools, and libraries
Infra β aws lambda β modal β supabase β mongo
Python β fastapi β django β flask β sqlalchemy β streamlit
JavaScript β fastapi β nextjs β react β express β trpc β graphql β fastify β knex β nestjs β pino
Other supported frameworks, tools, and libraries
β aio-pika β aiohttp-client β aiohttp-server β aiopg β asgi β asyncio β asyncpg β aws-lambda β boto β boto3sqs β botocore β cassandra β celery β confluent-kafka β dbapi β django β elasticsearch β falcon β fastapi β flask β grpc β httpx β jinja2 β kafka-python β logging β loguru β mysql β mysqlclient β pika β psycopg β psycopg2 β pymemcache β pymongo β pymysql β pyramid β redis β remoulade β requests β sklearn β sqlalchemy β sqlite3 β starlette β system-metrics β threading β tornado β tortoiseorm β urllib β urllib3 β wsgi
There are more integrations are on the way! Donβt see a language or framework you use? Let us know!
SDK Instrumentation
If you are using a language or framework that is not supported out of the box or you want to track your own functions, you can use our SDK to instrument your code.
Logging
Use Pythonβs native logging
library to log messages in your code.
import logging
logger = logging.getLogger(__name__)
# Message gets logged to IUDEX and Slack
logger.info("Hello IUDEX!", extra={"iudex.slack_channel_id": "YOUR_SLACK_CHANNEL_ID"})
Any attribute in the extra
dictionary will be filterable in the IUDEX dashboard.
This is a great place to put data like request id and user id.
Tracing
Tracing a function helps track the flow of data through your application and is quite helpful for debugging.
You can trace your function by annotating it with trace
.
For example:
def my_function(arg1):
pass
turns into
from iudex import trace
@trace
def my_function(arg1):
pass