## New Features ### Universal Instrumentation Container - Created deploy/instrumentation/ with Dockerfile that downloads OTel agents for: - .NET (glibc and musl/Alpine versions) - Node.js (with auto-instrumentation package) - Python (bootstrap script + requirements) - Java (javaagent JAR) - Go (example code for compile-time instrumentation) - PHP (composer package + init script) ### Universal instrument.sh Script - Auto-detects application language from running processes - Generates docker-compose snippets for each language - Supports: dotnet, nodejs, python, java, go, php - Usage: ./instrument.sh <container> [language] [otlp_endpoint] ### Improved docker-compose.yml - Added instrumentation init container with shared volume - Added AGENT_KEY environment variable for proper auth - Added ophion-agent service for host metrics collection - Named containers for easier management - Added ophion-network for service discovery ### Documentation - Created docs/QUICK_START.md with: - Single-command installation - Instrumentation guide for all languages - Troubleshooting section - Authentication guide ### Auth Fixes - Server now properly validates AGENT_KEY for agent authentication - OTel Collector configured with AGENT_KEY for forwarding to server - Fixed 401 errors when agents connect ## Files Changed - docker-compose.yml: Complete stack with all services - deploy/instrumentation/*: Universal OTel agent container - deploy/docker/otel-collector-config.yaml: Fixed auth headers - instrument.sh: Universal instrumentation script - docs/QUICK_START.md: Complete quick start guide - README.md: Updated with new features - .env.example: Added AGENT_KEY ## Testing - Go code compiles successfully - Docker images build correctly - All changes are backwards compatible
52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
# 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
|
|
```
|