Skip to content

baz-scm/falken-trace-go

Repository files navigation

falken-trace-go

Enhance OpenTelemetry with pinpointed code-level observability for Golang.
Baz on GitHub »

Install
go get github.com/baz-scm/falken-trace-go


🚀 What is Falken Trace?

Falken Trace extends OpenTelemetry and Datadog for Go by pinpointing file names, function names, and line numbers that generate spans. It addresses gaps in default observability implementations, making tracing faster and more actionable.

Discovered while building Baz, Falken Trace streamlines debugging and enhances insights into codebase behaviors.


Install

go get github.com/baz-scm/falken-trace-go

Usage

With dd-trace-go

Just replace the tracer.StartSpanFromContext calls with falken.StartSpanFromContext.

import (
    "context"

-   "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
+   falken "github.com/baz-scm/falken-trace-go/tracing/datadog"
)

func doSomething(ctx context.Context) {
-   span, _ := tracer.StartSpanFromContext(ctx, "doSomething")
+   span, _ := falken.StartSpanFromContext(ctx, "doSomething")
    defer span.Finish()
    
    ...
}

With otel

Just replace the otel.Tracer calls with falken.Tracer.

import (
    "context"

-   "go.opentelemetry.io/otel"
+   falken "github.com/baz-scm/falken-trace-go/tracing/opentelemetry"
)

var (
-   tracer = otel.Tracer("tracer")
+   tracer = falken.Tracer("tracer")
)

func doSomething(ctx context.Context) {
    _, span := falken.Start(ctx, "doSomething")
    defer span.End()
    
    ...
}

🔗 Learn More

Python library: https://github.com/baz-scm/falken-trace-py

Blog post: Extending OpenTelemetry to Pinpoint Code Elements

About

Enhances traces with code metadata

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages