Skip to content

Commit bf25ed0

Browse files
MrAliasdamemitiffany76opentelemetrybotcartermp
authored
Add Go OTLP over gRPC exporter section (#5104)
Co-authored-by: Mike Dame <[email protected]> Co-authored-by: Tiffany Hrabusa <[email protected]> Co-authored-by: opentelemetrybot <[email protected]> Co-authored-by: Phillip Carter <[email protected]>
1 parent 93e799d commit bf25ed0

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

content/en/docs/languages/go/exporters.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Exporters
33
aliases: [exporting_data]
44
weight: 50
55
# prettier-ignore
6-
cSpell:ignore: otlplog otlploghttp otlpmetric otlpmetricgrpc otlpmetrichttp otlptrace otlptracegrpc otlptracehttp promhttp stdoutlog stdouttrace
6+
cSpell:ignore: otlplog otlploggrpc otlploghttp otlpmetric otlpmetricgrpc otlpmetrichttp otlptrace otlptracegrpc otlptracehttp promhttp stdoutlog stdouttrace
77
---
88

99
{{% docs/languages/exporters/intro go %}}
@@ -222,3 +222,23 @@ func newExporter(ctx context.Context) (log.Exporter, error) {
222222
return otlploghttp.New(ctx)
223223
}
224224
```
225+
226+
### OTLP logs over gRPC (Experimental)
227+
228+
[`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc)
229+
contains an implementation of OTLP logs exporter using gRPC.
230+
231+
Here's how you can create an exporter with default configuration:
232+
233+
```go
234+
import (
235+
"context"
236+
237+
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc"
238+
"go.opentelemetry.io/otel/sdk/log"
239+
)
240+
241+
func newExporter(ctx context.Context) (log.Exporter, error) {
242+
return otlploggrpc.New(ctx)
243+
}
244+
```

static/refcache.json

+4
Original file line numberDiff line numberDiff line change
@@ -8167,6 +8167,10 @@
81678167
"StatusCode": 200,
81688168
"LastSeen": "2024-01-18T19:10:29.862565-05:00"
81698169
},
8170+
"https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc": {
8171+
"StatusCode": 200,
8172+
"LastSeen": "2024-08-26T18:58:45.152084327Z"
8173+
},
81708174
"https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp": {
81718175
"StatusCode": 200,
81728176
"LastSeen": "2024-04-25T07:21:16.712986-07:00"

0 commit comments

Comments
 (0)