Skip to content

Releases

AddAttributes() now works after Start()

Choose a tag to compare

@wendall-robinson wendall-robinson released this 02 Dec 03:08
5dd1e34

Updated trace.AddAttribute() to allow adding new attributes after .Start() has been called. This is a backwards compatible change and prior implementations will still work as is.

Added `ExtractGRPCContext` as a stand alone Public Method

Choose a tag to compare

@wendall-robinson wendall-robinson released this 28 Feb 15:54
82e4906

Primary Change

  • Removed trace.ExtractGRPCContext as a receiver method of Trace
    • this extractor returns a context.Context and cannot be a chaninable (fluid) method of the Trace struct
  • Added ExtractGRPCContext as a standalone Public Method
    • when extracting gRPC trace data using ExtractGRPCContext, extract it into a new context before passing it to a new trace

Message Queue Trace Propagation Support

Choose a tag to compare

@wendall-robinson wendall-robinson released this 27 Feb 01:05
3a01f53

Primary Change

Add message queue propagation

  • added trace propagation and trace context extraction support for NATS
  • added trace propagation and trace context extraction support for Kafka
  • added trace propagation and trace context extraction support for RabbitMQ

Example

Add a trace context into a NATS header

package main

import (
	"context"
	"fmt"

	"github.com/nats-io/nats.go"
	"github.com/wendall-robinson/flowmaster/traceflow"
)

func main() {
    ctx := context.Background()

    // Create a new span for the nats publish event itself (not the propagation)
    span := traceflow.New(ctx, "nats").Producer()

    header := nats.Header{}

    // will inject the NATS header into the current trace context
    traceflow.PropagateNats(trace.GetContext(), nats.Header{})

    // Publish the Request
    < NATS IMPLEMENTATION >

}

Extract trace context from a NATS header

package main

import (
	"context"
	"fmt"

	"github.com/nats-io/nats.go"
	"github.com/wendall-robinson/flowmaster/traceflow"
)

func main() {
   // incoming NATS message
   < NATS INBOUND MESSAGE HANDLING IMPLEMENTATION >

    // Extract the trace context from the incoming message and forwarding it
    newCtx := traceflow.ExtractNats(ctx, nats.Header)

    // Create a new span for the nats subscribe event
    span := traceflow.New(newCtx, "nats").Consumer()

   defer span.Start("nats-event").End()
}

Golang and Dependancie Updates

Choose a tag to compare

@wendall-robinson wendall-robinson released this 27 Feb 00:30
fe1fd5f

Primary Changes

Updated to Go v1.24.0

  • updated dependencies
  • updated otel-config.yamlin basic example to remove deprecated logger configuration
  • updated linters to remove deprecated linters
  • fixed minor linting issues in traceflow/config.go

Initial Release of TraceFlow

Choose a tag to compare

@wendall-robinson wendall-robinson released this 09 Nov 05:02

TraceFlow is a Go package that provides a simple, fluent interface for integrating OpenTelemetry distributed tracing into your Go applications. It abstracts away much of the complexity and boilerplate involved in creating and managing traces, allowing developers to focus on their application logic while still benefiting from powerful distributed tracing features.