Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Releases: census-ecosystem/opencensus-go-exporter-ocagent

Release v0.7.1

15 Aug 07:27
b599b1f
Compare
Choose a tag to compare

#87 Travis build fix and optimisation
#85 Make max annotations and events per span configurable
#84 Add an option to set metric name prefix

Release v0.7.0 (Roaring 20s)

28 May 21:06
e526276
Compare
Choose a tag to compare

Features:

  • Ensuring that ResourceDetector is respected by the exporter, in PR #80
  • Updated dependencies to remove deprecated protoc generator in PR #83

Release v0.6.0

05 Aug 22:26
a8a6f45
Compare
Choose a tag to compare
  • a8a6f45: Add a method Exporter.ExportMetricsServiceRequest that accepts proto metrics (#75)

Release v0.5.0

25 Apr 22:55
8780371
Compare
Choose a tag to compare

c87d375 Expose grpc.DialOption (#61)
738c4b1 indefiniteBackgroundConnection shouldn't hold Stop() after attempt to connect (#62)
44fbaec Record last connection error and attempt connection on Start() (#63)
8780371 Update dependency versions. Run go mod tidy. (#65)

TLS for all

19 Feb 21:46
5a6e73f
Compare
Choose a tag to compare

Added a new option WithTLSCredentials which allows ocagent to dial to servers using TLS Credentials.
This feature was requested in #44 and added with PR #45

This provides parity with ocagent's new TLS backed OpenCensus receiver with #45

Example

func Example_withTLS() {
	// Please take at look at:
	//    https://godoc.org/google.golang.org/grpc/credentials#TransportCredentials
	// for ways on how to initialize gRPC TransportCredentials.
	creds, err := credentials.NewClientTLSFromFile("my-cert.pem", "")
	if err != nil {
		log.Fatalf("Failed to create gRPC client TLS credentials: %v", err)
	}

	exp, err := ocagent.NewExporter(ocagent.WithTLSCredentials(creds), ocagent.WithServiceName("engine"))
	if err != nil {
		log.Fatalf("Failed to create the agent exporter: %v", err)
	}
	defer exp.Stop()

	// Now register it as a trace exporter.
	trace.RegisterExporter(exp)

	// Then use the OpenCensus tracing library, like we normally would.
	ctx, span := trace.StartSpan(context.Background(), "Securely-Talking-To-Agent-Span")
	defer span.End()

	for i := 0; i < 10; i++ {
		_, iSpan := trace.StartSpan(ctx, fmt.Sprintf("Sample-%d", i))
		<-time.After(6 * time.Millisecond)
		iSpan.End()
	}
}

Background redial

17 Oct 05:22
7c99379
Compare
Choose a tag to compare

No more failing fast, that is:

  • The ocagent-exporter will not stop working if an agent isn't yet available. It will automatically
    attempt reconnect in the background if the agent is ever taken down, indefinitely.

OpenCensus Agent Go Exporter 0.2.0

14 Sep 23:53
00af367
Compare
Choose a tag to compare

00af367 Do not include v1 in package path (#10)
3d695a1 Add Go module support (#9)

First release -- config and trace streaming only

12 Sep 17:33
688cc33
Compare
Choose a tag to compare

This is the first release of the agent-exporter in Go. It'll require an OpenCensus Agent to have been setup.
The agent-exporter makes a gRPC connection to the OpenCensus Agent, and streams up spans while also receiving trace configurations sent down by the OpenCensus Agent.

By default the agent connects on port 55678 on localhost, however we provide options to connect to different addresses such as ocagent.WithAddress("the address here")

Sample usage

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	"contrib.go.opencensus.io/exporter/ocagent/v1"
	"go.opencensus.io/trace"
)

func main() {
	exp, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithServiceName("your-service-name"))
	if err != nil {
		log.Fatalf("Failed to create the agent exporter: %v", err)
	}
	defer exp.Stop()

	// Now register it as a trace exporter.
	trace.RegisterExporter(exp)

	// Then use the OpenCensus tracing library, like we normally would.
	ctx, span := trace.StartSpan(context.Background(), "AgentExporter-Example")
	defer span.End()

	for i := 0; i < 10; i++ {
		_, iSpan := trace.StartSpan(ctx, fmt.Sprintf("Sample-%d", i))
		<-time.After(6 * time.Millisecond)
		iSpan.End()
	}
}