| 24 | const OTEL_LOG_FILE = path.join(OTEL_DIR, 'collector-gcp.log'); |
| 25 | |
| 26 | const getOtelConfigContent = (projectId) => ` |
| 27 | receivers: |
| 28 | otlp: |
| 29 | protocols: |
| 30 | grpc: |
| 31 | endpoint: "localhost:4317" |
| 32 | processors: |
| 33 | batch: |
| 34 | timeout: 1s |
| 35 | exporters: |
| 36 | googlecloud: |
| 37 | project: "${projectId}" |
| 38 | metric: |
| 39 | prefix: "custom.googleapis.com/anus_cli" |
| 40 | log: |
| 41 | default_log_name: "anus_cli" |
| 42 | debug: |
| 43 | verbosity: detailed |
| 44 | service: |
| 45 | telemetry: |
| 46 | logs: |
| 47 | level: "debug" |
| 48 | metrics: |
| 49 | level: "none" |
| 50 | pipelines: |
| 51 | traces: |
| 52 | receivers: [otlp] |
| 53 | processors: [batch] |
| 54 | exporters: [googlecloud] |
| 55 | metrics: |
| 56 | receivers: [otlp] |
| 57 | processors: [batch] |
| 58 | exporters: [googlecloud, debug] |
| 59 | logs: |
| 60 | receivers: [otlp] |
| 61 | processors: [batch] |
| 62 | exporters: [googlecloud, debug] |
| 63 | `; |
| 64 | |
| 65 | async function main() { |
| 66 | console.log('✨ Starting Local Telemetry Exporter for Google Cloud ✨'); |