This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
forked from lightstep/opentelemetry-exporter-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request lightstep#29 from lightstep/kay/deprecate
Mark repository as deprecated
- Loading branch information
Showing
1 changed file
with
1 addition
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,3 @@ | ||
# Lightstep OpenTelemetry Golang Exporter | ||
|
||
This is a Lightstep exporter for opentelemetry-go. | ||
|
||
## Initialize | ||
|
||
This example connects to Lightstep and sends a single span. | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"context" | ||
"log" | ||
|
||
"github.com/lightstep/opentelemetry-exporter-go/lightstep" | ||
"go.opentelemetry.io/otel/api/global" | ||
sdktrace "go.opentelemetry.io/otel/sdk/trace" | ||
) | ||
|
||
func main() { | ||
exporter, err := lightstep.NewExporter( | ||
lightstep.WithAccessToken("<ACCESS_TOKEN>"), | ||
lightstep.WithServiceName("my-service"), | ||
) | ||
if err != nil { | ||
log.Fatalf("Failed to initialize Lightstep exporter: %v", err) | ||
} | ||
defer exporter.Close() | ||
|
||
tp, err := sdktrace.NewProvider( | ||
sdktrace.WithConfig(sdktrace.Config{ | ||
DefaultSampler: sdktrace.AlwaysSample()}), | ||
sdktrace.WithSyncer(exporter)) | ||
global.SetTraceProvider(tp) | ||
|
||
ctx := context.Background() | ||
_, span := global.Tracer("example").Start(ctx, "hello") | ||
span.End() | ||
|
||
exporter.Flush() | ||
} | ||
``` | ||
|
||
## Release | ||
|
||
To make a release, do these steps | ||
1. Run `make ver=X.Y.Z version` | ||
1. Update CHANGELOG.md | ||
1. Merge changes | ||
1. Run `make release_tag` | ||
This exporter is now deprecated. Lightstep can receive OpenTelemetry data via the OpenTelemetry Protocol (OTLP) Exporter. The easiest way to configure it is using the [OpenTelemetry Launcher](https://github.com/lightstep/otel-launcher-go/) |