@@ -292,8 +292,8 @@ codebase. This allows you to customize the observability data your application
292
292
emits.
293
293
294
294
You'll also want to configure an appropriate exporter to
295
- [export your telemetry data](/docs/instrumentation/erlang/getting-started#exporting-to-the-opentelemetry-collector)
296
- to one or more telemetry backends.
295
+ [export your telemetry data](/docs/instrumentation/erlang/exporters) to one or
296
+ more telemetry backends.
297
297
298
298
## Creating a New Mix/Rebar Project
299
299
@@ -561,120 +561,11 @@ iex(2)>
561
561
{{< /tabpane >}}
562
562
<!-- prettier-ignore-end -->
563
563
564
- ## Exporting to the OpenTelemetry Collector
564
+ ## Next Steps
565
565
566
- The [Collector](/docs/collector/) provides a vendor agnostic way to receive,
567
- process and export telemetry data. The package
568
- [opentelemetry_exporter](https://hex.pm/packages/opentelemetry_exporter)
569
- provides support for both exporting over both HTTP (the default) and gRPC to the
570
- collector, which can then export Spans to a self-hosted service like Zipkin or
571
- Jaeger, as well as commercial services. For a full list of available exporters,
572
- see the [registry](/ecosystem/registry/?component=exporter).
566
+ Enrich your instrumentation with more
567
+ [manual instrumentation](/docs/instrumentation/erlang/manual).
573
568
574
- For testing purposes the `opentelemetry-erlang` repo has a Collector
575
- configuration,
576
- [config/otel-collector-config.yaml](https://github.com/open-telemetry/opentelemetry-erlang/blob/main/config/otel-collector-config.yaml)
577
- that can be used as a starting point. This configuration is used in
578
- [docker-compose.yml](https://github.com/open-telemetry/opentelemetry-erlang/blob/main/docker-compose.yml)
579
- to start the Collector with receivers for both HTTP and gRPC that then export to
580
- Zipkin also run by [docker-compose](https://docs.docker.com/compose/).
581
-
582
- To export to the running Collector the `opentelemetry_exporter` package must be
583
- added to the project's dependencies:
584
-
585
- <!-- prettier-ignore-start -->
586
- {{< tabpane langEqualsHeader=true >}}
587
-
588
- {{< tab Erlang >}}
589
- {deps, [{opentelemetry_api, "~> 1.3"},
590
- {opentelemetry, "~> 1.3"},
591
- {opentelemetry_exporter, "~> 1.4"}]}.
592
- {{< /tab >}}
593
-
594
- {{< tab Elixir >}}
595
- def deps do
596
- [
597
- {:opentelemetry_api, "~> 1.3"},
598
- {:opentelemetry, "~> 1.3"},
599
- {:opentelemetry_exporter, "~> 1.4"}
600
- ]
601
- end
602
- {{< /tab >}}
603
-
604
- {{< /tabpane >}}
605
- <!-- prettier-ignore-end -->
606
-
607
- It should then be added to the configuration of the Release before the SDK
608
- Application to ensure the exporter's dependencies are started before the SDK
609
- attempts to initialize and use the exporter.
610
-
611
- Example of Release configuration in `rebar.config` and for
612
- [mix's Release task](https://hexdocs.pm/mix/Mix.Tasks.Release.html):
613
-
614
- <!-- prettier-ignore-start -->
615
- {{< tabpane langEqualsHeader=true >}}
616
-
617
- {{< tab Erlang >}}
618
- %% rebar.config
619
- {relx, [{release, {my_instrumented_release, "0.1.0"},
620
- [opentelemetry_exporter,
621
- {opentelemetry, temporary},
622
- my_instrumented_app]},
623
-
624
- ...]}.
625
- {{< /tab >}}
626
-
627
- {{< tab Elixir >}}
628
- # mix.exs
629
- def project do
630
- [
631
- releases: [
632
- my_instrumented_release: [
633
- applications: [opentelemetry_exporter: :permanent, opentelemetry: :temporary]
634
- ],
635
-
636
- ...
637
- ]
638
- ]
639
- end
640
- {{< /tab >}}
641
-
642
- {{< /tabpane >}}
643
- <!-- prettier-ignore-end -->
644
-
645
- Finally, the runtime configuration of the `opentelemetry` and
646
- `opentelemetry_exporter` Applications are set to export to the Collector. The
647
- configurations below show the defaults that are used if none are set, which are
648
- the HTTP protocol with endpoint of `localhost` on port `4318`. If using `grpc`
649
- for the `otlp_protocol` the endpoint should be changed to
650
- `http://localhost:4317`.
651
-
652
- <!-- prettier-ignore-start -->
653
- {{< tabpane langEqualsHeader=true >}}
654
-
655
- {{< tab Erlang >}}
656
- %% config/sys.config.src
657
- [
658
- {opentelemetry,
659
- [{span_processor, batch},
660
- {traces_exporter, otlp}]},
661
-
662
- {opentelemetry_exporter,
663
- [{otlp_protocol, http_protobuf},
664
- {otlp_endpoint, "http://localhost:4318"}]}]}
665
- ].
666
- {{< /tab >}}
667
-
668
- {{< tab Elixir >}}
669
- # config/runtime.exs
670
- config :opentelemetry,
671
- span_processor: :batch,
672
- traces_exporter: :otlp
673
-
674
- config :opentelemetry_exporter,
675
- otlp_protocol: :http_protobuf,
676
- otlp_endpoint: "http://localhost:4318"
677
- {{< /tab >}}
678
-
679
- {{< /tabpane >}}
680
- <!-- prettier-ignore-end -->
569
+ You'll also want to configure an appropriate exporter to
570
+ [export your telemetry data](/docs/instrumentation/erlang/exporters) to one or
571
+ more telemetry backends.
0 commit comments