Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/docker-otel-lgtm
Path: blob/main/examples/go/run.sh
401 views
1
#!/bin/bash
2
3
set -euo pipefail
4
5
export OTEL_METRIC_EXPORT_INTERVAL="5000" # so we don't have to wait 60s for metrics
6
export OTEL_RESOURCE_ATTRIBUTES="service.name=rolldice,service.instance.id=localhost:8081"
7
8
# Run the application
9
export OTEL_EXPORTER_OTLP_INSECURE="true" # use http instead of https (needed because of https://github.com/open-telemetry/opentelemetry-go/issues/4834)
10
go run .
11
12