Gathering detailed insights and metrics for @opentelemetry/instrumentation-grpc
Gathering detailed insights and metrics for @opentelemetry/instrumentation-grpc
Gathering detailed insights and metrics for @opentelemetry/instrumentation-grpc
Gathering detailed insights and metrics for @opentelemetry/instrumentation-grpc
@opentelemetry/plugin-grpc
OpenTelemetry grpc automatic instrumentation package.
@opentelemetry/plugin-grpc-js
OpenTelemetry @grpc/grpc-js automatic instrumentation package.
@codeparrot/instrumentation-grpc
Dependency of @codeparrot/js-agent
nice-grpc-opentelemetry
OpenTelemetry instrumentation for nice-grpc
OpenTelemetry JavaScript Client
npm install @opentelemetry/instrumentation-grpc
Typescript
Module System
Min. Node Version
Node Version
NPM Version
semconv/v1.36.0
Updated on Jul 10, 2025
experimental/v0.203.0
Updated on Jul 09, 2025
experimental/v0.202.0
Updated on Jun 02, 2025
semconv/v1.34.0
Updated on May 21, 2025
semconv/v1.33.1
Updated on May 20, 2025
experimental/v0.201.1
Updated on May 19, 2025
TypeScript (96.76%)
JavaScript (2.94%)
Jinja (0.21%)
Shell (0.08%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
3,034 Stars
2,719 Commits
909 Forks
53 Watchers
19 Branches
340 Contributors
Updated on Jul 15, 2025
Latest Version
0.203.0
Package Id
@opentelemetry/instrumentation-grpc@0.203.0
Unpacked Size
148.96 kB
Size
33.80 kB
File Count
36
NPM Version
lerna/6.6.2/node@v18.20.8+x64 (linux)
Node Version
18.20.8
Published on
Jul 09, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
20
Note: This is an experimental package under active development. New releases may include breaking changes.
This module provides automatic instrumentation for @grpc/grpc-js
. Currently, version 1.x
of @grpc/grpc-js
is supported.
For automatic instrumentation see the @opentelemetry/sdk-trace-node package.
1npm install --save @opentelemetry/instrumentation-grpc
@grpc/grpc-js
versions ^1.0.0
OpenTelemetry gRPC Instrumentation allows the user to automatically collect trace data and export them to the backend of choice, to give observability to distributed systems when working with (grpc-js).
To load a specific instrumentation (gRPC in this case), specify it in the Node Tracer's configuration.
1const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); 2const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); 3const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 4 5const provider = new NodeTracerProvider({ 6 spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] 7}); 8 9provider.register(); 10 11registerInstrumentations({ 12 instrumentations: [new GrpcInstrumentation()] 13}); 14
See examples/grpc-js for examples.
gRPC instrumentation accepts the following configuration:
Options | Type | Description |
---|---|---|
ignoreGrpcMethods | IgnoreMatcher[] | gRPC instrumentation will not trace any methods that match anything in this list. You may pass a string (case-insensitive match), a RegExp object, or a filter function. |
metadataToSpanAttributes | object | List of case insensitive metadata to convert to span attributes. Client and server (outgoing requests, incoming responses) metadata attributes will be converted to span attributes in the form of rpc.{request\response}.metadata.metadata_key , e.g. rpc.response.metadata.date |
Up to and including v0.200.0, instrumentation-grpc
generates telemetry using Semantic Conventions v1.7.0.
HTTP semantic conventions (semconv) were stabilized in v1.23.0, and a migration process was defined.
instrumentation-grpc
versions 0.201.0 and later include support for migrating to stable HTTP semantic conventions, as described below.
The intent is to provide an approximate 6 month time window for users of this instrumentation to migrate to the new HTTP semconv, after which a new minor version will use the new semconv by default and drop support for the old semconv.
See the HTTP semconv migration plan for OpenTelemetry JS instrumentations.
To select which semconv version(s) is emitted from this instrumentation, use the OTEL_SEMCONV_STABILITY_OPT_IN
environment variable.
http
: emit the new (stable) v1.23.0 semanticshttp/dup
: emit both the old v1.7.0 and the new (stable) v1.23.0 semanticsOTEL_SEMCONV_STABILITY_OPT_IN
includes neither of the above tokens, the old v1.7.0 semconv is used.v1.7.0 semconv | v1.23.0 semconv | Short Description |
---|---|---|
net.peer.name | server.address | Server domain name if available without reverse DNS lookup |
net.peer.port | server.port | Server port number |
Attribute | Short Description |
---|---|
rpc.method | The name of the (logical) method being called, must be equal to the $method part in the span name. |
rpc.service | The full (logical) name of the service being called, including its package name, if applicable. |
rpc.system | A string identifying the remoting system. |
When upgrading to the new semantic conventions, it is recommended to do so in the following order:
@opentelemetry/instrumentation-grpc
to the latest versionOTEL_SEMCONV_STABILITY_OPT_IN=http/dup
to emit both old and new semantic conventionsOTEL_SEMCONV_STABILITY_OPT_IN=http
to emit only the new semantic conventionsThis will cause both the old and new semantic conventions to be emitted during the transition period.
Apache 2.0 - See LICENSE for more information.
No vulnerabilities found.
Reason
update tool detected
Details
Reason
30 commit(s) and 13 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
security policy file detected
Details
Reason
29 out of 29 merged PRs checked by a CI test -- score normalized to 10
Reason
project has 43 contributing companies or organizations
Details
Reason
Found 29/30 approved changesets -- score normalized to 9
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Project has not signed or included provenance with any releases.
Details
Reason
project is not fuzzed
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14T20:15:31Z
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