Example instrumentation of Golang Application with OpenTelemetry with supported configurations to export to Sentry.

Sentry + Opentelemetry Go Example

Requirements

To run this example, you will need a kubernetes cluster. This example has been tried and tested on

  • Minikube
  • AWS Elastic Kuberetes Service and should work on any configured kubernetes environment.

K8S components used

  • Config Map (otel-collector-conf) for opentelemetry collector
  • Service to expose port 4317 of collector deployment (to recieve OTLP traces)
  • Deployment
    • Opentelemetry Collector
    • Instrumented Golang application Deployment

Steps

  1. Create an observabilitiy namespace in the cluster.
$ kubectl create ns observability
  1. Change the configmap in k8s.yaml and add your sentry DSN in line 31
      sentry:
        dsn: <your sentry DSN here>
  1. Apply the kubernetes configuration in the observability namespace.
$ kubectl apply -f k8s.yaml -n observability
  1. Once the deployment is done, port forward the sample gin server to your localhost (ensure that your 8088 port is free from any pre-binding, i.e. no other server is using that)
$ kubectl port-forward -n observability svc/otlp-instrumentation-demo 8088:8088
  1. Visit your localhost:8088/users/123

  2. Visit your Sentry UI to see something similar to this Sentry UI

Owner
Uddeshya Singh
CSE @ HBTU '21 | Fullstack and Infra | GSoC'19 Student Developer @fossasia | GCI'19 Mentor @fossasia @tensorflow
Uddeshya Singh
Similar Resources

A hack example to servce file as a webserver with a Google Cloud Functions

Overview This project is a hack example to servce file as a webserver with a Google Cloud Functions (normally single purpose, only one entry point). I

Nov 26, 2021

Simple example of creating an `LD_PRELOAD` library in Go that hooks LibC's main function.

LD_PRELOAD in Go Simple example of creating an LD_PRELOAD library in Go that hooks LibC's main function. Code hooks __libc_start_main to run before th

Nov 9, 2022

mtail - extract internal monitoring data from application logs for collection into a timeseries database

 mtail - extract internal monitoring data from application logs for collection into a timeseries database

mtail - extract internal monitoring data from application logs for collection into a timeseries database mtail is a tool for extracting metrics from a

Dec 29, 2022

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥.   👉  Open source Application Performance Monitoring (APM) & Observability tool

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc. Documentatio

Sep 24, 2021

This is a toolKit/template project for web application/server with Gin, packed common services.

gin-toolKit This is a toolKit/template project for web application/server with Gin, packed common services. These services include fasthttp, xrate, lo

May 26, 2022

Simple and blazing fast lockfree logging library for golang

Simple and blazing fast lockfree logging library for golang

glg is simple golang logging library Requirement Go 1.11 Installation go get github.com/kpango/glg Example package main import ( "net/http" "time"

Nov 28, 2022

Logging library for Golang

GLO Logging library for Golang Inspired by Monolog for PHP, severity levels are identical Install go get github.com/lajosbencz/glo Severity levels Deb

Sep 26, 2022

a golang log lib supports level and multi handlers

go-log a golang log lib supports level and multi handlers Use import "github.com/siddontang/go-log/log" //log with different level log.Info("hello wo

Dec 29, 2022

LogVoyage - logging SaaS written in GoLang

LogVoyage - logging SaaS written in GoLang

No longer maintained, sorry. Completely rewritten v2 is going to be released soon. Please follow http://github.com/logvoyage LogVoyage - fast and simp

Sep 26, 2022
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go

Package monkit is a flexible code instrumenting and data collection library. See documentation at https://godoc.org/gopkg.in/spacemonkeygo/monkit.v3 S

Dec 14, 2022
OpenTelemetry log collection library

opentelemetry-log-collection Status This project was originally developed by observIQ under the name Stanza. It has been contributed to the OpenTeleme

Sep 15, 2022
Tool for generating OpenTelemetry tracing decorators.

tracegen Tool for generating OpenTelemetry tracing decorators. Installation go get -u github.com/KazanExpress/tracegen/cmd/... Usage tracegen generate

Apr 7, 2022
logger wraps uber/zap and trace with opentelemetry

logger 特性 支持 uber/zap 日志 支持 log rolling,使用 lumberjace 支持日志追踪 支持debug、info、warn、e

Sep 17, 2022
Shikhandi: a tiny load generator for opentelemetry and heavily

shikhandi is a tiny load generator for opentelemetry and heavily inspired by thi

Oct 7, 2022
Tracetest - Trace-based testing. End-to-end tests powered by your OpenTelemetry Traces.
Tracetest - Trace-based testing. End-to-end tests powered by your OpenTelemetry Traces.

End-to-end tests powered by OpenTelemetry. For QA, Dev, & Ops. Live Demo | Documentation | Twitter | Discord | Blog Click on the image or this link to

Jan 3, 2023
Export svn log to excel

Export svn log to excel

May 13, 2022
Export git log to excel

说明 功能 将git日志导出成excel 使用方法 自己将程序放到bin目录或者复制到程序执行的目录 运行gitlog.exe 参数 -h,显示帮助 -l,导出日志数量,默认50 -m,导出包含merge,默认false -o,输出文件,默认comment.xlsx -v,显示详细输出,,默认fal

Nov 26, 2021
An example logging system using Prometheus, Loki, and Grafana.
An example logging system using Prometheus, Loki, and Grafana.

Logging Example Structure Collector Export numerical data for Prometheus and log data for Promtail. Exporter uses port 8080 Log files are saved to ./c

Nov 21, 2022
An Example about how React can be bootstrapped with Go backend

go-reactjs-example This is an exmple web use Golang(Yaelf95) And ReactJS Build Suggest install node through nvm npm install -g webpack npm install mak

Nov 27, 2021