From 9741f5fc30667f0348496ab61c2286b01c2986ee Mon Sep 17 00:00:00 2001 From: Paulin Todev Date: Thu, 19 Oct 2023 11:15:10 +0100 Subject: [PATCH] Parametrize the OTel version in docs. --- docs/developer/updating-otel.md | 1 + docs/sources/_index.md | 1 + docs/sources/_index.md.t | 1 + .../components/otelcol.processor.transform.md | 48 +++++++++---------- .../static/configuration/traces-config.md | 34 ++++++------- 5 files changed, 44 insertions(+), 41 deletions(-) diff --git a/docs/developer/updating-otel.md b/docs/developer/updating-otel.md index 6b59e6d805bc..6770f3c30328 100644 --- a/docs/developer/updating-otel.md +++ b/docs/developer/updating-otel.md @@ -83,6 +83,7 @@ Unfortunately, updating Otel dependencies is not straightforward: whether it is really necessary. * Search the Agent repository for the old version (e.g. "0.87") to find code and documentation which also needs updating. + * Update the `OTEL_VERSION` parameter in the `docs/sources/_index.md.t` file. 5. Some Agent components reuse OpenTelemetry code, but do not import it: * `otelcol.extension.jaeger_remote_sampling`: a lot of this code has been copy-pasted from Otel and modified slightly to fit the Agent's needs. diff --git a/docs/sources/_index.md b/docs/sources/_index.md index a87bbbdd7eaf..6f2d00508349 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -9,6 +9,7 @@ description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry weight: 350 cascade: AGENT_RELEASE: v0.37.2 + OTEL_VERSION: v0.87.0 --- # Grafana Agent diff --git a/docs/sources/_index.md.t b/docs/sources/_index.md.t index 2301f07a4107..276c3b5b6912 100644 --- a/docs/sources/_index.md.t +++ b/docs/sources/_index.md.t @@ -9,6 +9,7 @@ description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry weight: 350 cascade: AGENT_RELEASE: $AGENT_VERSION + OTEL_VERSION: v0.87.0 --- # Grafana Agent diff --git a/docs/sources/flow/reference/components/otelcol.processor.transform.md b/docs/sources/flow/reference/components/otelcol.processor.transform.md index 563fdc016954..b54755710a04 100644 --- a/docs/sources/flow/reference/components/otelcol.processor.transform.md +++ b/docs/sources/flow/reference/components/otelcol.processor.transform.md @@ -73,9 +73,9 @@ to a new metric data type or can be used to create new metrics. - [Orphaned Telemetry][]: The processor allows you to modify `span_id`, `trace_id`, and `parent_span_id` for traces and `span_id`, and `trace_id` logs. Modifying these fields could lead to orphaned spans or logs. -[Unsound Transformations]: https://github.com/open-telemetry/opentelemetry-collector/blob/v0.87.0/docs/standard-warnings.md#unsound-transformations -[Identity Conflict]: https://github.com/open-telemetry/opentelemetry-collector/blob/v0.87.0/docs/standard-warnings.md#identity-conflict -[Orphaned Telemetry]: https://github.com/open-telemetry/opentelemetry-collector/blob/v0.87.0/docs/standard-warnings.md#orphaned-telemetry +[Unsound Transformations]: https://github.com/open-telemetry/opentelemetry-collector/blob/{{< param "OTEL_VERSION" >}}/docs/standard-warnings.md#unsound-transformations +[Identity Conflict]: https://github.com/open-telemetry/opentelemetry-collector/blob/{{< param "OTEL_VERSION" >}}/docs/standard-warnings.md#identity-conflict +[Orphaned Telemetry]: https://github.com/open-telemetry/opentelemetry-collector/blob/{{< param "OTEL_VERSION" >}}/docs/standard-warnings.md#orphaned-telemetry [no-op]: https://en.wikipedia.org/wiki/NOP_(code) [metrics data model]: https://github.com/open-telemetry/opentelemetry-specification/blob/main//specification/metrics/data-model.md {{% /admonition %}} @@ -552,24 +552,24 @@ Some values in the River strings are [escaped][river-strings]: [river-strings]: {{< relref "../../config-language/expressions/types_and_values.md/#strings" >}} -[traces protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v0.17.0/opentelemetry/proto/trace/v1/trace.proto -[metrics protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v0.17.0/opentelemetry/proto/metrics/v1/metrics.proto -[logs protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v0.17.0/opentelemetry/proto/logs/v1/logs.proto - - -[OTTL]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/README.md -[OTTL functions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/ottlfuncs/README.md -[convert_sum_to_gauge]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/transformprocessor#convert_sum_to_gauge -[convert_gauge_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/transformprocessor#convert_gauge_to_sum -[convert_summary_count_val_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/transformprocessor#convert_summary_count_val_to_sum -[convert_summary_sum_val_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/transformprocessor#convert_summary_sum_val_to_sum -[OTTL booleans]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/pkg/ottl#booleans -[OTTL math expressions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/pkg/ottl#math-expressions -[OTTL boolean expressions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/pkg/ottl#boolean-expressions -[OTTL resource context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottlresource/README.md -[OTTL scope context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottlscope/README.md -[OTTL span context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottlspan/README.md -[OTTL spanevent context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottlspanevent/README.md -[OTTL metric context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottlmetric/README.md -[OTTL datapoint context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottldatapoint/README.md -[OTTL log context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/pkg/ottl/contexts/ottllog/README.md +[traces protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/trace/v1/trace.proto +[metrics protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/metrics/v1/metrics.proto +[logs protobuf]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.0.0/opentelemetry/proto/logs/v1/logs.proto + + +[OTTL]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/README.md +[OTTL functions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/ottlfuncs/README.md +[convert_sum_to_gauge]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/transformprocessor#convert_sum_to_gauge +[convert_gauge_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/transformprocessor#convert_gauge_to_sum +[convert_summary_count_val_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/transformprocessor#convert_summary_count_val_to_sum +[convert_summary_sum_val_to_sum]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/transformprocessor#convert_summary_sum_val_to_sum +[OTTL booleans]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/pkg/ottl#booleans +[OTTL math expressions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/pkg/ottl#math-expressions +[OTTL boolean expressions]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/pkg/ottl#boolean-expressions +[OTTL resource context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottlresource/README.md +[OTTL scope context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottlscope/README.md +[OTTL span context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottlspan/README.md +[OTTL spanevent context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottlspanevent/README.md +[OTTL metric context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottlmetric/README.md +[OTTL datapoint context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottldatapoint/README.md +[OTTL log context]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/pkg/ottl/contexts/ottllog/README.md diff --git a/docs/sources/static/configuration/traces-config.md b/docs/sources/static/configuration/traces-config.md index a8f931c5a906..7ddb8e62bda8 100644 --- a/docs/sources/static/configuration/traces-config.md +++ b/docs/sources/static/configuration/traces-config.md @@ -70,7 +70,7 @@ remote_write: # Only grpc/otlp is supported in Grafana Cloud. [ format: | default = "otlp" | supported = "otlp" ] - # Controls whether or not TLS is required. See https://godoc.org/google.golang.org/grpc#WithInsecure + # Controls whether or not TLS is required. See https://godoc.org/google.golang.org/grpc#WithInsecure [ insecure: | default = false ] # Deprecated in favor of tls_config @@ -80,7 +80,7 @@ remote_write: # Configures opentelemetry exporters to use the OpenTelemetry auth extension `oauth2clientauthextension`. # Can not be used in combination with `basic_auth`. - # See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/extension/oauth2clientauthextension/README.md + # See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/extension/oauth2clientauthextension/README.md oauth2: # Configures the TLS settings specific to the oauth2 client # The client identifier issued to the oauth client @@ -96,7 +96,7 @@ remote_write: # Optional, specifies the timeout fetching tokens from the token_url. Default: no timeout [ timeout: ] # TLS client configuration for the underneath client to authorization server. - # https://github.com/open-telemetry/opentelemetry-collector/blob/v0.87.0/config/configtls/README.md + # https://github.com/open-telemetry/opentelemetry-collector/blob/{{< param "OTEL_VERSION" >}}/config/configtls/README.md tls: # Disable validation of the server certificate. [ insecure: | default = false ] @@ -191,7 +191,7 @@ automatic_logging: # Receiver configurations are mapped directly into the OpenTelemetry receivers # block. At least one receiver is required. -# The Agent uses OpenTelemetry v0.87.0. Refer to the corresponding receiver's config. +# The Agent uses OpenTelemetry {{< param "OTEL_VERSION" >}}. Refer to the corresponding receiver's config. # # Supported receivers: otlp, jaeger, kafka, opencensus and zipkin. receivers: @@ -414,7 +414,7 @@ service_graphs: # jaeger_remote_sampling configures one or more jaeger remote sampling extensions. # For more details about the configuration please consult the OpenTelemetry documentation: -# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/extension/jaegerremotesampling +# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/extension/jaegerremotesampling # # Example config: # @@ -434,17 +434,17 @@ jaeger_remote_sampling: More information on the following types can be found on the documentation for their respective projects: -* [`attributes.config`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/attributesprocessor) -* [`batch.config`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.87.0/processor/batchprocessor) -* [`otlpexporter.sending_queue`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.87.0/exporter/otlpexporter) -* [`otlpexporter.retry_on_failure`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.87.0/exporter/otlpexporter) +* [`attributes.config`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/attributesprocessor) +* [`batch.config`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/{{< param "OTEL_VERSION" >}}/processor/batchprocessor) +* [`otlpexporter.sending_queue`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/{{< param "OTEL_VERSION" >}}/exporter/otlpexporter) +* [`otlpexporter.retry_on_failure`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/{{< param "OTEL_VERSION" >}}/exporter/otlpexporter) * `receivers`: - * [`jaegerreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/receiver/jaegerreceiver) - * [`kafkareceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/receiver/kafkareceiver) - * [`otlpreceiver`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.87.0/receiver/otlpreceiver) - * [`opencensusreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/receiver/opencensusreceiver) - * [`zipkinreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/receiver/zipkinreceiver) + * [`jaegerreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/jaegerreceiver) + * [`kafkareceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/kafkareceiver) + * [`otlpreceiver`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/{{< param "OTEL_VERSION" >}}/receiver/otlpreceiver) + * [`opencensusreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/opencensusreceiver) + * [`zipkinreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/zipkinreceiver) * [`scrape_config`: Prometheus](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#scrape_config) -* [`spanmetricsprocessor.latency_histogram_buckets`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/processor/spanmetricsprocessor/config.go#L37-L39) -* [`spanmetricsprocessor.dimensions`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.87.0/processor/spanmetricsprocessor/config.go#L41-L48) -* [`tailsamplingprocessor.policies`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.87.0/processor/tailsamplingprocessor) +* [`spanmetricsprocessor.latency_histogram_buckets`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/processor/spanmetricsprocessor/config.go#L37-L39) +* [`spanmetricsprocessor.dimensions`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/processor/spanmetricsprocessor/config.go#L41-L48) +* [`tailsamplingprocessor.policies`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/tailsamplingprocessor)