Skip to content

Common configuration and uses for logs, metrics, and traces.

Notifications You must be signed in to change notification settings

orbservability/telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telemetry

Common configuration and uses for logs, metrics, and traces.

Installation

require (
  github.com/orbservability/telemetry v0.0.2
)

Usage

Global

Global configuration is automatically provided via init() functions, provided that the package is imported.

import (
  _ "github.com/orbservability/telemetry/pkg/logs"
)

Server

Provides common tooling for the following use cases:

  • gRPC

    import (
      "github.com/orbservability/telemetry/pkg/logs"
      "github.com/orbservability/telemetry/pkg/metrics"
      "github.com/orbservability/telemetry/pkg/traces"
      "google.golang.org/grpc"
    )
    
    grpcServer := grpc.NewServer(
      grpc.ChainUnaryInterceptor(traces.UnaryServerInterceptor, logs.UnaryServerInterceptor, metrics.UnaryServerInterceptor),
      grpc.ChainStreamInterceptor(traces.StreamServerInterceptor, logs.StreamServerInterceptor, metrics.StreamServerInterceptor),
      // ...
    )

Client

Provides common tooling for the following use cases:

  • gRPC

    import (
      "github.com/orbservability/telemetry/pkg/logs"
      "github.com/orbservability/telemetry/pkg/metrics"
      "github.com/orbservability/telemetry/pkg/traces"
      "google.golang.org/grpc"
    )
    
    conn, err := grpc.Dial(
      "https://api.orbservability.com",
      grpc.WithChainUnaryInterceptor(traces.UnaryClientInterceptor, logs.UnaryClientInterceptor, metrics.UnaryClientInterceptor),
      grpc.WithChainStreamInterceptor(traces.StreamClientInterceptor, logs.StreamClientInterceptor, metrics.StreamClientInterceptor),
      // ...
    )

About

Common configuration and uses for logs, metrics, and traces.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published