Categorygithub.com/facily-tech/go-core/telemetry
modulepackage
1.3.0
Repository: https://github.com/facily-tech/go-core.git
Documentation: pkg.go.dev

# README

Telemetry

Telemetry is a lib to simplify Telemetry Agents instalations.

Installation

go get github.com/facily-tech/go-core/telemetry

Implementation Examples

  1. Implement it instance; (Ex: https://github.com/facily-tech/go-scaffold/blob/main/internal/container/container.go)
  2. Implement it's close function into Main; (Ex: https://github.com/facily-tech/go-scaffold/blob/main/cmd/api/main.go)
  3. Implement the traces. (Ex: https://github.com/facily-tech/go-scaffold/blob/main/internal/api/handler.go)

# Functions

Client receive *http.Client and return a *http.Client with datadog tracer wrapped in it.
NewDatadog returns a new Datadog implementation.
NewNewRelic Create a new NewRelic instance.

# Constants

DataDogConfigPrefix is the prefix of datadog Environment.
DataDogName is a string of type Name with holds the telemetry tool, which is "datadog".
NewRelicName is a string of type Name, which is "newrelic".
TracerKey is the key used to define tracer key name when adding it on logging.

# Structs

CommandResultParam are the metrics to be attached as span's attributes.
DataDog implements Tracer.
DataDogConfig is the struct of config given to NewDataDog.
NewRelic implements Tracer.

# Interfaces

Span interface handle span usage.
SpanContext handle spans in context.
A Tracer has methods to help tracer instrumentation of our services.

# Type aliases

Command is a callback function to be implemented with block segment that should be covered.
Name is a string type to hold the name of Tracer implemantation.