You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Examples/OTLP Exporter/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,14 @@ The prometheus client will be available at <http://localhost:9090>.
38
38
Note: It may take some timefor the application metrics to appear on the Prometheus dashboard.
39
39

40
40
41
+
5. If you don't set service.name as per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md the default name of the service and spans generate by the OTLP Exporter is `unknown_service:otlpexporter` You can either set the service.name by editing the schema in Xcode and the set the environment variable for OTEL_RESOURCE_ATTRIBUTES, or set it via command line:
42
+
43
+
```shell script
44
+
# from this directory
45
+
OTEL_RESOURCE_ATTRIBUTES="service.name=my-swift-app,service.version=v1.2.3" swift run OTLPExporter
46
+
```
47
+
This will create a service and spans with the name `my-swift-app`
48
+
41
49
## Useful links
42
50
43
51
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
0 commit comments