# OPHION OpenTelemetry Agents

This volume contains auto-instrumentation agents for all major languages.

## Directory Structure
- `/otel/dotnet/` - .NET auto-instrumentation (glibc)
- `/otel/dotnet-musl/` - .NET auto-instrumentation (Alpine/musl)
- `/otel/nodejs/` - Node.js SDK and loader
- `/otel/python/` - Python requirements and bootstrap
- `/otel/java/` - Java agent JAR
- `/otel/go/` - Go instrumentation examples
- `/otel/php/` - PHP composer package

## Environment Variables (all languages)
- OTEL_EXPORTER_OTLP_ENDPOINT=http://ophion-otel-collector:4318
- OTEL_SERVICE_NAME=your-service-name
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production

## Usage Examples

### .NET
```dockerfile
ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658571}
ENV CORECLR_PROFILER_PATH=/otel/dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so
ENV DOTNET_ADDITIONAL_DEPS=/otel/dotnet/AdditionalDeps
ENV DOTNET_SHARED_STORE=/otel/dotnet/store
ENV DOTNET_STARTUP_HOOKS=/otel/dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll
ENV OTEL_DOTNET_AUTO_HOME=/otel/dotnet
```

### Node.js
```bash
node -r /otel/nodejs/instrument.js your-app.js
```

### Python
```bash
source /otel/python/bootstrap.sh
opentelemetry-instrument python your-app.py
```

### Java
```bash
java -javaagent:/otel/java/opentelemetry-javaagent.jar -jar your-app.jar
```

### PHP
```bash
cd your-app && composer require open-telemetry/sdk open-telemetry/exporter-otlp
```
