{"_id":"@askluna/exporter-logs-otlp-http-wintercg","_rev":"3-ba0f5ba27dedd6106648847985511006","name":"@askluna/exporter-logs-otlp-http-wintercg","dist-tags":{"latest":"0.48.2"},"versions":{"0.48.0":{"name":"@askluna/exporter-logs-otlp-http-wintercg","version":"0.48.0","publishConfig":{"access":"public"},"description":"This is a wintercg compatable package of @opentelemetry/exporter-logs-otlp-http","author":{"name":"Ask Luna"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http","license":"Apache-2.0","type":"module","main":"dist/index.js","module":"dist/index.js","esnext":"dist/index.js","types":"dist/index.d.ts","browser":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"engines":{"node":">=20"},"keywords":["opentelemetry","nodejs","tracing","profiling","logs","stats","wintercg"],"sideEffects":false,"devDependencies":{"@types/node":"^20.11.19","tsup":"^8.0.2","typescript":"5.3.3","vite":"^5.1.4","vite-plugin-dts":"^3.7.3","vite-tsconfig-paths":"^4.3.1"},"dependencies":{"@opentelemetry/api-logs":"^0.48.0","@opentelemetry/otlp-exporter-base":"^0.48.0","@opentelemetry/otlp-transformer":"^0.48.0","@opentelemetry/sdk-logs":"^0.48.0"},"scripts":{"build":"vite build","build:watch":"vite build --watch"},"_id":"@askluna/exporter-logs-otlp-http-wintercg@0.48.0","_integrity":"sha512-zzEqSKvs8knNgYWLWBROSj5a8W5hUtDt9IdPXHJO97j67jxjW7CUjVeh8zAxYE1dPgdak48hNjmbwZ63hb0ppA==","_resolved":"/private/var/folders/4f/697ggy6x26q8kh9qb2js4xnc0000gn/T/4a9b40337001d88b4b2466ef440c0cba/askluna-exporter-logs-otlp-http-wintercg-0.48.0.tgz","_from":"file:askluna-exporter-logs-otlp-http-wintercg-0.48.0.tgz","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-zzEqSKvs8knNgYWLWBROSj5a8W5hUtDt9IdPXHJO97j67jxjW7CUjVeh8zAxYE1dPgdak48hNjmbwZ63hb0ppA==","shasum":"a7f44e41bb0a5d4275bd27b53aecab45be8f9c88","tarball":"https://registry.npmjs.org/@askluna/exporter-logs-otlp-http-wintercg/-/exporter-logs-otlp-http-wintercg-0.48.0.tgz","fileCount":6,"unpackedSize":530780,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDel0P1dKua2eMp2LzIJ9iH7YGdhH0HYfS5VXJmqRBqRwIhAKpXWN+dBkxC4ftC8r8Fk/d0+l3ja/lH67K5cbn/WOhp"}]},"_npmUser":{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"},"directories":{},"maintainers":[{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exporter-logs-otlp-http-wintercg_0.48.0_1708651544767_0.2957948394393308"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.48.1":{"name":"@askluna/exporter-logs-otlp-http-wintercg","version":"0.48.1","publishConfig":{"access":"public"},"description":"This is a wintercg compatable package of @opentelemetry/exporter-logs-otlp-http","author":{"name":"Ask Luna"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http","license":"Apache-2.0","type":"module","main":"dist/index.js","module":"dist/index.js","esnext":"dist/index.js","types":"dist/index.d.ts","browser":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"engines":{"node":">=20"},"keywords":["opentelemetry","nodejs","tracing","profiling","logs","stats","wintercg"],"sideEffects":false,"devDependencies":{"@types/node":"^20.11.19","tsup":"^8.0.2","typescript":"5.3.3","vite":"^5.1.4","vite-plugin-dts":"^3.7.3","vite-tsconfig-paths":"^4.3.1"},"dependencies":{"@opentelemetry/api-logs":"^0.48.0","@opentelemetry/otlp-exporter-base":"^0.48.0","@opentelemetry/otlp-transformer":"^0.48.0","@opentelemetry/sdk-logs":"^0.48.0"},"scripts":{"build":"vite build","build:watch":"vite build --watch"},"_id":"@askluna/exporter-logs-otlp-http-wintercg@0.48.1","_integrity":"sha512-uiEMDm8TEoidvpoJod8GCnb7Sk7oujp7ayVSzmmfEZuqJPdFUAW9XUXOYGOdTeBeodxV2S1aJrsy3dmLctBp3g==","_resolved":"/private/var/folders/4f/697ggy6x26q8kh9qb2js4xnc0000gn/T/7b721944aef34b68ae2475dd5d8204a5/askluna-exporter-logs-otlp-http-wintercg-0.48.1.tgz","_from":"file:askluna-exporter-logs-otlp-http-wintercg-0.48.1.tgz","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-uiEMDm8TEoidvpoJod8GCnb7Sk7oujp7ayVSzmmfEZuqJPdFUAW9XUXOYGOdTeBeodxV2S1aJrsy3dmLctBp3g==","shasum":"956ebc112013e841d7868e4ffb63dfe34c28f6c0","tarball":"https://registry.npmjs.org/@askluna/exporter-logs-otlp-http-wintercg/-/exporter-logs-otlp-http-wintercg-0.48.1.tgz","fileCount":6,"unpackedSize":532488,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQBKTNq1miBJt3zfJcrwN5PGshhKtb9jm34gwOPv+4PAiEAv1EJPvbhtJ2aoJYnZLw6kQ88WZXTb9WmKTK1VLeVxX0="}]},"_npmUser":{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"},"directories":{},"maintainers":[{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exporter-logs-otlp-http-wintercg_0.48.1_1708651838094_0.6050671764263027"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.48.2":{"name":"@askluna/exporter-logs-otlp-http-wintercg","version":"0.48.2","publishConfig":{"access":"public"},"description":"This is a wintercg compatable package of @opentelemetry/exporter-logs-otlp-http","author":{"name":"Ask Luna"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http","license":"Apache-2.0","type":"module","main":"dist/index.js","module":"dist/index.js","esnext":"dist/index.js","types":"dist/index.d.ts","browser":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"engines":{"node":">=20"},"keywords":["opentelemetry","nodejs","tracing","profiling","logs","stats","wintercg"],"sideEffects":false,"devDependencies":{"@types/node":"^20.11.20","tsup":"^8.0.2","typescript":"5.3.3","vite":"^5.1.4","vite-plugin-dts":"^3.7.3","vite-tsconfig-paths":"^4.3.1","@askluna/configs":"1.0.0","@askluna/eslint-config":"0.0.0"},"dependencies":{"@opentelemetry/api-logs":"^0.48.0","@opentelemetry/otlp-exporter-base":"^0.48.0","@opentelemetry/otlp-transformer":"^0.48.0","@opentelemetry/sdk-logs":"^0.48.0","@opentelemetry/api":"^1.7.0","@opentelemetry/core":"^1.21.0","@opentelemetry/resources":"^1.21.0","@opentelemetry/sdk-trace-base":"^1.21.0","@opentelemetry/semantic-conventions":"^1.21.0"},"scripts":{"build":"vite build","build:watch":"vite build --watch"},"_id":"@askluna/exporter-logs-otlp-http-wintercg@0.48.2","_integrity":"sha512-j//C4arjdy+S89H49E286aLBxgM5CvLX2EzTSvrk9ttLsZn8W0kPHTT4WAdT+vzes4TH+khFazbcZzcx0jOAXg==","_resolved":"/private/var/folders/4f/697ggy6x26q8kh9qb2js4xnc0000gn/T/480ad94f7b18b3cbff662f1eb3e57ccd/askluna-exporter-logs-otlp-http-wintercg-0.48.2.tgz","_from":"file:askluna-exporter-logs-otlp-http-wintercg-0.48.2.tgz","_nodeVersion":"21.7.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-j//C4arjdy+S89H49E286aLBxgM5CvLX2EzTSvrk9ttLsZn8W0kPHTT4WAdT+vzes4TH+khFazbcZzcx0jOAXg==","shasum":"29abf38d2b7670db51bfcd6b3acc6bcb1bf72ab9","tarball":"https://registry.npmjs.org/@askluna/exporter-logs-otlp-http-wintercg/-/exporter-logs-otlp-http-wintercg-0.48.2.tgz","fileCount":6,"unpackedSize":532750,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlGtXJe6Kl1h0Qb5s0zI8nbU6V5cCfO635ocWHplnIdAIhAIa3nbKPLHjR5S5/MtZoBB6ZeAOZRgBBCYCNixxhZjIy"}]},"_npmUser":{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"},"directories":{},"maintainers":[{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exporter-logs-otlp-http-wintercg_0.48.2_1712755594136_0.024210926659993692"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2024-02-23T01:25:44.671Z","0.48.0":"2024-02-23T01:25:45.043Z","modified":"2024-04-11T17:10:25.299Z","0.48.1":"2024-02-23T01:30:38.311Z","0.48.2":"2024-04-10T13:26:34.331Z"},"maintainers":[{"name":"shravansunder","email":"shravan.sunder.dev@gmail.com"}],"description":"This is a wintercg compatable package of @opentelemetry/exporter-logs-otlp-http","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http","keywords":["opentelemetry","nodejs","tracing","profiling","logs","stats","wintercg"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"author":{"name":"Ask Luna"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"license":"Apache-2.0","readme":"# OpenTelemetry Collector Logs Exporter for web and node with HTTP\n\n**Note: This is an experimental package under active development. New releases may include breaking changes.**\n\nThis module provides a logs-exporter for OTLP (http/json).\n\n## Installation\n\n```bash\nnpm install --save @askluna/exporter-logs-otlp-http-wintercg\n```\n\n## Use\n\n```typescript\n/**\n * Registers an OpenTelemetry logger with the specified parameters.\n * @param params - The parameters for registering the logger.\n * @param params.otelIdentifier - The identifier for the OpenTelemetry logger.\n * @param params.apiKey - The API key for authentication.\n * @param params.endpoint - The endpoint for sending logs.\n * @param reregister - Optional. Specifies whether to re-register the logger if it already exists. Default is false.\n * @returns A promise that resolves to a Result object containing the logger if successful, or an error if unsuccessful.\n */\nexport const registerOtelLogger = async (\n params: {\n  otelIdentifier: CreateOtelLogProviderParams['otelIdentifier'];\n  auth:\n   | {\n     kind: 'api-key';\n     value: string;\n     }\n   | {\n     kind: 'dns';\n     value: string;\n     };\n  endpoint: string;\n },\n reregister: boolean = false\n): Promise<Logger | null> => {\n\n  const otelLogger : Logger | null = null;\n  // make sure fetch is in the right state when using with https://github.com/evanderkoogh/otel-cf-workers\n  // you may have to wait for the fetch proxy to be ready\n\n const logProvider = await createOtelLogProvider({\n  otelIdentifier: params.otelIdentifier,\n  exportOptions: {\n   url: params.endpoint,\n   headers: { [params.auth.kind]: params.auth.value },\n   compression: 'gzip' as never,\n   hostname: globalThis.hostUrl,\n   concurrencyLimit: 1, // an optional limit on pending requests\n   fetch: (input, init) => {\n    return fetch(input, init);\n   },\n  },\n });\n\n if (logProvider) {\n  otelLogger = createOtelLogger(logProvider, { name: params.otelIdentifier.name })\n  return otelLogger;\n } else {\n  otelLogger = null\n }\n\n return otelLogger;\n};\n```\n\n## Further Documentation\n\nPlease see **@opentelemetry/exporter-logs-otlp-http** for futher details.  [Github link](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/exporter-logs-otlp-http/README.md?plain=1)\n\nThis is a shim that works to make **@opentelemetry/exporter-logs-otlp-http compatible with**\n\n## Environment Variable Configuration\n\nIn addition to settings passed to the constructor, the exporter also supports configuration via environment variables:\n\n| Environment variable | Description |\n| --- | --- |\n| OTEL_EXPORTER_OTLP_ENDPOINT | The endpoint to send logs to. This will also be used for the traces exporter if `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` is not configured. By default `http://localhost:4318` will be used. `/v1/logs` will be automatically appended to configured values. |\n| OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | The endpoint to send logs to. By default `https://localhost:4318/v1/logs` will be used. `v1/logs` will not be appended automatically and has to be added explicitly. |\n| OTEL_EXPORTER_OTLP_LOGS_TIMEOUT | The maximum waiting time, in milliseconds, allowed to send each OTLP log batch. Default is 10000. |\n| OTEL_EXPORTER_OTLP_TIMEOUT | The maximum waiting time, in milliseconds, allowed to send each OTLP trace/metric/log batch. Default is 10000. |\n\n> Settings configured programmatically take precedence over environment variables. Per-signal environment variables take precedence over non-per-signal environment variables.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-js/discussions)\n\n## License\n\nApache 2.0 - See [LICENSE](https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE) for more information.\n","readmeFilename":"README.md"}