Guides
Instrumentation

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