Categorygithub.com/logicmonitor/lm-telemetry-sdk-go
module
0.0.0-20221104062605-f06bd483261a
Repository: https://github.com/logicmonitor/lm-telemetry-sdk-go.git
Documentation: pkg.go.dev

# README

LM-telemetry-sdk-go, a go sdk for OpenTelemetry by LogicMonitor

codecov build_and_test Go Reference Go Report Card

NOTE: This is in private beta.

LM-telemetry-sdk-go

  1. Aims to minimize adding initialization code for opentelemetry tracing, assumes default values
  2. It has implementation for cloud specific resource detectors

Installation

go get github.com/logicmonitor/lm-telemetry-sdk-go

Usage

Resource detection for cloud environments

AWS
EC2

import github.com/logicmonitor/lm-telemetry-sdk-go/resource/detectors/aws/ec2
...
lmEc2Detector := ec2.NewResourceDetector()
ctx := context.Background()
resource,err := lmEc2Detector.Detect(ctx)

ECS

import github.com/logicmonitor/lm-telemetry-sdk-go/resource/detectors/aws/ecs
...
lmEcsDetector := ecs.NewResourceDetector()
ctx := context.Background()
resource,err := lmEcsDetector.Detect(ctx)

EKS

import github.com/logicmonitor/lm-telemetry-sdk-go/resource/detectors/aws/eks
...
lmEksDetector := eks.NewResourceDetector()
ctx := context.Background()
resource,err := lmEksDetector.Detect(ctx)

Lambda

import github.com/logicmonitor/lm-telemetry-sdk-go/resource/detectors/aws/lambda
...
lmLambdaDetector := lambda.NewResourceDetector()
ctx := context.Background()
resource,err := lmLambdaDetector.Detect(ctx)

Resource Detector env config

Environment variable LM_RESOURCE_DETECTOR must be set to one of the following values, to set appropriate resource detector

ValueDescription
aws_ec2AWS Elastic Compute Cloud
aws_ecsAWS Elastic Container Service
aws_eksAWS Elastic Kubernetes Service
aws_lambdaAWS Lambda
gcp_compute_engineGoogle Cloud Compute Engine (GCE)
gcp_kubernetes_engineGoogle Cloud Kubernetes Engine (GKE)
gcp_cloud_functionsGoogle Cloud Functions (GCF)

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author