{"name":"@opentelemetry/sdk-logs","version":"0.37.0","keywords":["opentelemetry","nodejs","logs","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-logs@0.37.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/sdk-logs","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"737a00d39af68a150647ecca87aa46cc146a5f72","tarball":"http://registry-npm.ywwl.com/@opentelemetry/sdk-logs/download/@opentelemetry/sdk-logs-0.37.0.tgz","fileCount":192,"integrity":"sha512-bGcN+RGK0cEC0nCldoIJN31TYW/43RC4Pw+mqgY2WhM4vDV90/CFeEovkyMJ5FpFck+E9RFV/cN6mBuQbYgblA==","signatures":[{"sig":"MEUCIQCmkJy281bJEqBTuKZ/QR20zKbRC38m8i7c+T4MipydzgIgGBhEWzH2af2tRWpKeHZ0hVsMgV2ZAlAtfW/Vc8/EG2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlehAAnrBq3Ibsn2z9gg7iEbaqz/seC4wOPpChrZCaPTy0UN2O2v33\r\nphaQIA7zTQm26+8JQAgbJsMTzm1kE2nj8ScpJHWHn59lku3I1SEx9Hf1aRIh\r\nTt4KBCJ9R5gub7mnyCcPyfp6KrZIt4lXGxCTJPaUt31WMH2GNQaL8ecCObIJ\r\nMUEhk+e6yVq1aaDsDSrhNF/fRWGrNMAUFokz3mZLCGyKpc4XQiQkp4/fWSoC\r\nt4WecgsV/lJ9r9fhUNBnhQmTjJiRgO8cR9RyWxK8pZiArUiYPubTZpeDk6sn\r\nQo8hk/tCJtgTQfK3YGZllVDqsW/7/tiy7EVdgym1DB+cBOrB2tI1O4fFrtTh\r\nhtgojyo9tov3xW6p+2WGg5MOPCwHfN6CJYgX6aC2SK2eyZL3M5r7eg3+J2o7\r\nfI8REelhNfFx75ZjLzOIdKWtHNNclGdAN7Mfc/jH4DSQ+s0DjBNLwx4KfeQm\r\n6bR1vre3M7uygeW0DMZyfjbJFvj2MOayGLFAthBLxsDgvu+g+T7IDO9RBTa9\r\nwO7xOpYxBcyW+nQHIyZ7leqOzIJGZFGo9xZB3sqwjNo+FzZ38qUBBHJXLhhU\r\naizQwxvsfnPu/pcTMTmT7QFhNWvnuO+whlSlJZPeU7XADy7UzyhX5P0U3VUM\r\nr95h8OIfelxODHJNflSpq/G+Emm6L/okE1g=\r\n=0Pt+\r\n-----END PGP SIGNATURE-----\r\n","size":44792,"noattachment":false,"key":"/@opentelemetry/sdk-logs/-/@opentelemetry/sdk-logs-0.37.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry logs SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"^1.11.0","@opentelemetry/resources":"^1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.4.0 <1.5.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/api-logs":">=0.37.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.4.0 <1.5.0","@opentelemetry/api-logs":">=0.37.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-logs_0.37.0_1681409581677_0.9725856336284948","host":"s3://npm-registry-packages"},"readme":"# OpenTelemetry Logs SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\n**Note: This is an experimental package under active development. New releases may include breaking changes.**\n\nOpenTelemetry logs module contains the foundation for all logs SDKs of [opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js).\n\nUsed standalone, this module provides methods for manual instrumentation of code, offering full control over recording logs for client-side JavaScript (browser) and Node.js.\n\nIt does **not** provide automated instrumentation of known libraries or host environment logs out-of-the-box.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/api-logs\nnpm install --save @opentelemetry/sdk-logs\n```\n\n## Usage\n\nThe basic setup of the SDK can be seen as followings:\n\n```js\nconst logsAPI = require('@opentelemetry/api-logs');\nconst {\n  LoggerProvider,\n  SimpleLogRecordProcessor,\n  ConsoleLogRecordExporter,\n} = require('@opentelemetry/sdk-logs');\n\n// To start a logger, you first need to initialize the Logger provider.\nconst loggerProvider = new LoggerProvider();\n// Add a processor to export log record\nloggerProvider.addLogRecordProcessor(\n  new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())\n);\n\n//  To create a log record, you first need to get a Logger instance\nconst logger = loggerProvider.getLogger('default');\n\n// You can also use global singleton\nlogsAPI.logs.setGlobalLoggerProvider(loggerProvider);\nconst logger = logsAPI.logs.getLogger('default');\n\n// emit a log record\nlogger.emit({\n  severityNumber: logsAPI.SeverityNumber.INFO,\n  severityText: 'INFO',\n  body: 'this is a log record body',\n  attributes: { 'log.type': 'LogRecord' },\n});\n```\n\n## Config\n\nLogs configuration is a merge of both the user supplied configuration and the default\nconfiguration as specified in [config.ts](./src/config.ts)\n\n## Example\n\nSee [examples/logs](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/logs)\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][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-logs\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk%2Dlogs.svg\n","publish_time":1681409581992,"_cnpm_publish_time":1681409581992,"dist-tags":{"canary":"3.0.0-rc.0","latest":"3.1.0"}}