Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

nice-grpc-opentelemetry

Package Overview
Dependencies
5
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

nice-grpc-opentelemetry

OpenTelemetry instrumentation for nice-grpc

    0.1.6latest
    GitHub

Version published
Maintainers
1
Weekly downloads
2,030
decreased by-8.64%

Weekly downloads

Changelog

Source

nice-grpc-error-details@0.1.6

0.1.6 (2023-03-05)

Note: Version bump only for package nice-grpc-error-details

Readme

Source

nice-grpc-opentelemetry npm version

OpenTelemetry instrumentation for nice-grpc. Currently provides only traces.

Installation

npm install nice-grpc-opentelemetry

Usage

Attach middleware as the first one on the server:

import {createServer} from 'nice-grpc'; import {openTelemetryServerMiddleware} from 'nice-grpc-opentelemetry'; const server = createServer() .use(openTelemetryServerMiddleware()) .use(/* ... other middleware */);

Attach middleware as the first one on the client:

import {createClientFactory} from 'nice-grpc'; // or 'nice-grpc-web' import {openTelemetryClientMiddleware} from 'nice-grpc-opentelemetry'; const clientFactory = createClientFactory() .use(openTelemetryClientMiddleware()) .use(/* ... other middleware */); const client = clientFactory.create(/* ... */);

Traces

This library generates spans according to Semantic conventions for RPC spans with an addition of custom attributes:

AttributeTypeDescriptionExamples
rpc.grpc.status_textstringThe name of the status of the gRPC requestINVALID_ARGUMENT

Keywords

FAQs

Last updated on 21 Mar 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc