Example demonstrating Instana instrumentation for Oracle database using sqlx and godror driver.
- Docker and Docker Compose
- Instana agent credentials (INSTANA_AGENT_KEY and INSTANA_DOWNLOAD_KEY)
- Set environment variables:
export INSTANA_AGENT_KEY=your_agent_key
export INSTANA_DOWNLOAD_KEY=your_download_key- Start services:
docker-compose up -d- Test the application:
curl http://localhost:8080/oracle
curl http://localhost:8080/healthThe example supports both Oracle connection string formats:
scott/tiger@(description=(address=(protocol=tcp)(host=hostdb1)(port=1521))(connect_data=(service_name=FREEPDB1)))user="scott" password="tiger" connectString="hostdb1:1521/FREEPDB1"update the following environment variable in docker-compose file to override the default Oracle connection string.
ORACLE_CONNECTION_STRING="your_connection_string"