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: docs/tutorials/setup-opentelemetry.md
+29-43Lines changed: 29 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,42 +6,37 @@ description: Tutorial to setup OpenTelemetry metrics and traces exporters in Bac
6
6
7
7
Backstage uses [OpenTelemetery](https://opentelemetry.io/) to instrument its components by reporting traces and metrics.
8
8
9
-
This tutorial shows how to setup exporters in your Backstage backend package. For demonstration purposes we will use the simple console exporters.
9
+
This tutorial shows how to setup exporters in your Backstage backend package. For demonstration purposes we will use a Prometheus exporter, but you can adjust your solution to use another one that suits your needs; see for example the article on [OTLP exporters](https://opentelemetry.io/docs/instrumentation/js/exporters/).
10
10
11
11
## Install dependencies
12
12
13
13
We will use the OpenTelemetry Node SDK and the `auto-instrumentations-node` packages.
14
14
15
-
Backstage packages, such as the catalog, uses the OpenTelemetry API to send custom traces and metrics.
15
+
Backstage packages, such as the catalog, use the OpenTelemetry API to send custom traces and metrics.
16
16
The `auto-instrumentations-node` will automatically create spans for code called in libraries like Express.
You can now start your Backstage instance as usual, using `yarn dev`.
86
-
87
-
When the backend is started, you should see in your console traces and metrics emitted by OpenTelemetry.
88
-
89
-
Of course in production you probably won't use the console exporters but instead send traces and metrics to an OpenTelemetry Collector or other exporter using [OTLP exporters](https://opentelemetry.io/docs/instrumentation/js/exporters/).
90
-
91
77
If you need to disable/configure some OpenTelemetry feature there are lots of [environment variables](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) which you can tweak.
0 commit comments