Gathering detailed insights and metrics for @opentelemetry/api-logs
Gathering detailed insights and metrics for @opentelemetry/api-logs
OpenTelemetry JavaScript Client
npm install @opentelemetry/api-logs
Typescript
Module System
Min. Node Version
Node Version
NPM Version
experimental/v0.57.1
Published on 14 Jan 2025
v1.30.1
Published on 14 Jan 2025
experimental/v0.57.0
Published on 18 Dec 2024
v1.30.0
Published on 18 Dec 2024
experimental/v0.56.0
Published on 04 Dec 2024
v1.29.0
Published on 04 Dec 2024
TypeScript (97.04%)
JavaScript (2.78%)
Jinja (0.1%)
Shell (0.08%)
Total Downloads
353,783,309
Last Day
2,855,138
Last Week
13,215,077
Last Month
54,166,969
Last Year
321,542,832
2,824 Stars
2,514 Commits
838 Forks
56 Watching
8 Branches
500 Contributors
Minified
Minified + Gzipped
Latest Version
0.57.1
Package Id
@opentelemetry/api-logs@0.57.1
Unpacked Size
195.54 kB
Size
22.72 kB
File Count
165
NPM Version
lerna/6.6.2/node@v18.20.5+x64 (linux)
Node Version
18.20.5
Publised On
14 Jan 2025
Cumulative downloads
Total Downloads
Last day
-1%
2,855,138
Compared to previous day
Last week
-11.3%
13,215,077
Compared to previous week
Last month
9.5%
54,166,969
Compared to previous month
Last year
897.3%
321,542,832
Compared to previous year
Note: This is an experimental package under active development. New releases may include breaking changes.
This package provides everything needed to interact with the unstable OpenTelemetry Logs Bridge API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.
Note: This module defines a log backend API. The API is not intended to be called by application developers directly. It is provided for logging library authors to build log appenders, which use this API to bridge between existing logging libraries and the OpenTelemetry log data model.
The Logs Bridge API is considered alpha software and there is no guarantee of stability or long-term support. When the API is stabilized, it will be made available and supported long-term in the @opentelemetry/api
package and this package will be deprecated.
Purposefully left blank until SDK is available.
Because the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same node_modules
structure, the OpenTelemetry API takes advantage of a variable on the global
object to store the global API. When an API method in the API package is called, it checks if this global
API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.
If you are writing an instrumentation library, or prefer to call the API methods directly rather than using the register
method on the Tracer/Meter/Logger Provider, OpenTelemetry provides direct access to the underlying API methods through the @opentelemetry/api-logs
package. API entry points are defined as global singleton objects trace
, metrics
, logs
, propagation
, and context
which contain methods used to initialize SDK implementations and acquire resources from the API.
1const api = require("@opentelemetry/api-logs"); 2 3/* A specific implementation of LoggerProvider comes from an SDK */ 4const loggerProvider = createLoggerProvider(); 5 6/* Initialize LoggerProvider */ 7api.logs.setGlobalLoggerProvider(loggerProvider); 8/* returns loggerProvider (no-op if a working provider has not been initialized) */ 9api.logs.getLoggerProvider(); 10/* returns a logger from the registered global logger provider (no-op if a working provider has not been initialized) */ 11const logger = api.logs.getLogger(name, version); 12 13// logging a log record in a log appender 14logger.emit({ severityNumber: SeverityNumber.TRACE, body: 'log data' });
Apache 2.0 - See LICENSE for more information.
No vulnerabilities found.
Reason
30 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
Reason
all changesets reviewed
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool is run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
8 existing vulnerabilities detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More