Skip to content

Commit 83974e0

Browse files
committed
Add note about TLS usage
1 parent 691bd8e commit 83974e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/docs/getting-started/go-sdk/trace-manual-instr.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ OpenTelemetry Go requires an exporter to send traces to a backend. Exporters all
7171
that data to various back-end systems.
7272

7373
To initialize the OTLP exporter, add the following code to the file the `main.go` file.
74+
75+
76+
**IMPORTANT**: The following example creates an OTLP exporter that does not encrypt data at transfer because it uses the `otlptracegrpc.WithInsecure()` option. This should only be used for creating proof of concepts and experimenting with the Go SDK.
77+
For production environments you must properly configure TLS using the `otlptracegrpc.WithTLSCredentials` function.
78+
7479
```go lineNumbers=true
7580
// Create and start new OTLP trace exporter
7681
traceExporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure(), otlptracegrpc.WithEndpoint("0.0.0.0:4317"), otlptracegrpc.WithDialOption(grpc.WithBlock()))

0 commit comments

Comments
 (0)