Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update opentelemetry docs to prefer OTLP http/protobuf over grpc #15846

Merged
merged 6 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To enable `zstd` in the collector, adapt the collector exporter config:

```
exporters:
otlp:
otlphttp:
...
compression: zstd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Cumulative sums are handled differently depending on whether they're monotonic o

#### Sum configuration examples [#config-sums]

To understand how to configure aggregation temporality, see these examples using the [Java](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java) and [Go](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-go) OpenTelemetry SDKs.
To understand how to configure aggregation temporality, see these examples using the [Java](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java) and [Python](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-python) OpenTelemetry SDKs.

### Gauge metrics [#gauge]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Download and install the Opentelemetry collector following [Opentelemetry docs](
You will need to install [OpenTelemetry Collector Contrib Distro](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib) or other distribution including, at least, the following components:

* [Dockerstats receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/dockerstatsreceiver)
* [OTLP exporter](https://pkg.go.dev/go.opentelemetry.io/collector/exporter/otlpexporter)
* [OTLP/HTTP exporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter)
* [Resource processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourceprocessor/README.md)
* [Resource detection processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md)

Expand Down Expand Up @@ -116,8 +116,8 @@ processors:
override: false

exporters:
otlp:
endpoint: https://otlp.nr-data.net:443
otlphttp:
endpoint: https://otlp.nr-data.net
headers:
api-key: NEW_RELIC_LICENSE_KEY

Expand All @@ -131,7 +131,7 @@ service:
- resourcedetection
- resourcedetection/cloud
- resource
exporters: [otlp]
exporters: [otlphttp]
```

For further configuration options, please review:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you haven't already done so, sign up for a free [New Relic account](https://n
## Review the prerequisites [#prerequisites]

[Configure the prometheus extension](https://github.com/hivemq/hivemq-prometheus-extension/blob/master/README.adoc) in your HiveMQ message platform.
</Step>
</Step>

<Step>
## Install the Opentelemetry collector [#install-opentelemetry-collector]
Expand Down Expand Up @@ -62,8 +62,8 @@ receivers:
metrics_path: HIVEMQ_PROMETHEUS_METRICS_PATH

exporters:
otlp:
endpoint: https://otlp.nr-data.net:4317
otlphttp:
endpoint: https://otlp.nr-data.net
headers:
api-key: NEW_RELIC_LICENSE_KEY
processors:
Expand All @@ -79,7 +79,7 @@ service:
metrics:
receivers: [prometheus]
processors: [batch, memory_limiter]
exporters: [otlp]
exporters: [otlphttp]
```

You may check [Opentelemetry Collector docs](https://opentelemetry.io/docs/collector/configuration/) and [Prometheus configuration docs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) for additional configuration details.
Expand All @@ -103,14 +103,14 @@ You may use the [metrics explorer](/docs/query-your-data/explore-query-data/brow

## Metric data details [#hivemq-metrics]

The table below lists examples of the kinds of metrics we collect.
The table below lists examples of the kinds of metrics we collect.

<Callout variant="note">
* Not all metrics may be available (and you may find additional metrics) depending on your HiveMQ setup, and not all metrics are available in the HiveMQ Community Edition.
* API REST module only exposes metrics when enabled.
* Certain HiveMQ extensions report specific metrics.
* Certain HiveMQ extensions report specific metrics.
* For a full list of HiveMQ metrics, see [HiveMQ documentation on available metrics](https://www.hivemq.com/docs/hivemq/latest/user-guide/monitoring.html#available-metrics).
</Callout>
</Callout>

Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/user-guide/monitoring.html#available-metrics) for additional information.

Expand All @@ -133,7 +133,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_cache_internal_export_states_averageLoadPenalty`
Expand Down Expand Up @@ -754,7 +754,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_backup_executor_completed_total`
Expand Down Expand Up @@ -3075,7 +3075,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_internal_after_join_cleanup_attributes_removal_in_progress_count`
Expand Down Expand Up @@ -8756,7 +8756,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_messages_client_pending_qos_0_count`
Expand Down Expand Up @@ -9867,7 +9867,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_rest_api_authentication_failed`
Expand Down Expand Up @@ -9948,7 +9948,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_cluster_internal_barrier_in_flight_threads_count`
Expand Down Expand Up @@ -10869,7 +10869,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_extension_consumer_messages_async_timed_out_total_count`
Expand Down Expand Up @@ -11030,7 +11030,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_jvm_buffer_pool_direct_capacity`
Expand Down Expand Up @@ -11481,7 +11481,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_networking_bytes_read_current`
Expand Down Expand Up @@ -11602,7 +11602,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_overload_protection_clients_average_credits`
Expand Down Expand Up @@ -11723,7 +11723,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_system_max_file_descriptor`
Expand Down Expand Up @@ -12294,7 +12294,7 @@ Check [HiveMQ metrics documentation](https://www.hivemq.com/docs/hivemq/latest/u
</tr>
</thead>
<tbody>

<tr>
<td>
`com_hivemq_control_center_tls_handshake_failed`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ Complete the steps below to collect Prometheus metrics.

<Steps>
<Step>
## Check for these prerequisites
## Check for these prerequisites

If you haven't already:

* [Sign up for a New Relic account](https://newrelic.com/signup).
* In your target app, make sure you're exposing the Prometheus metrics endpoint so it is accessible to the Prometheus receiver component in the OpenTelemetry collector.
* The Prometheus metrics endpoint could be enabled by default or you may need do do additional configuration to enable it.
* Some software may require a [third-party Prometheus exporter](https://prometheus.io/docs/instrumenting/exporters/#third-party-exporters) to expose metrics.
* Install the OpenTelemetry collector by following the steps in the [OpenTelemetry docs](https://opentelemetry.io/docs/collector/getting-started/).
* You can use any distribution so long as they have these two components: [OTLP exporter](https://pkg.go.dev/go.opentelemetry.io/collector/exporter/otlpexporter) and [Prometheus receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver)
* Install the OpenTelemetry collector by following the steps in the [OpenTelemetry docs](https://opentelemetry.io/docs/collector/getting-started/).
* You can use any distribution so long as they have these two components: [OTLP/HTTP exporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) and [Prometheus receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver)

</Step>
<Step>
Expand All @@ -38,7 +38,7 @@ Update or create a new file called `config.yaml` and replace the following keys

* Prometheus scrape config:
* `PROMETHEUS_JOBNAME`
* `PROMETHEUS_HOSTNAME`
* `PROMETHEUS_HOSTNAME`
* `PROMETHEUS_ENDPOINT_PORT`
* `PROMETHEUS_ENDPOINT_PATH` (optional, default is /metrics)
* [New Relic License key](/docs/apis/intro-apis/new-relic-api-keys/#license-key):
Expand All @@ -57,8 +57,8 @@ receivers:
metrics_path: PROMETHEUS_ENDPOINT_PATH

exporters:
otlp:
endpoint: https://otlp.nr-data.net:4317
otlphttp:
endpoint: https://otlp.nr-data.net
headers:
api-key: NEW_RELIC_LICENSE_KEY
processors:
Expand All @@ -69,7 +69,7 @@ service:
metrics:
receivers: [prometheus]
processors: [batch, memory_limiter]
exporters: [otlp]
exporters: [otlphttp]
```

For further configuration options, please review:
Expand All @@ -80,7 +80,7 @@ For further configuration options, please review:

</Step>
<Step>
## Run the collector
## Run the collector

Run the Opentelemetry collector. The way to run it may vary depending on the chosen installation method. For example:

Expand All @@ -95,10 +95,10 @@ For further configuration options, please review:
You may use the [metrics explorer](/docs/query-your-data/explore-query-data/browse-data/introduction-data-explorer) to check the metrics being ingested. All metrics reported by the OTEL Prometheus receiver are detected by running the following query.

```sql
SELECT count(*)
FROM Metric
WHERE instrumentation.provider='opentelemetry' and otel.library.name='otelcol/prometheusreceiver'
FACET metricName
SELECT count(*)
FROM Metric
WHERE instrumentation.provider='opentelemetry' and otel.library.name='otelcol/prometheusreceiver'
FACET metricName
```

</Step>
Expand All @@ -112,4 +112,4 @@ FACET metricName

```shell
otelcol-contrib --config ./config.yaml --feature-gates=-pkg.translator.prometheus.NormalizeName
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ After going through the installation steps, you'll view this metric data in pre-

## Prerequisites [#prereq]

In order to start collecting Redis metrics, you need to sign up for a free New Relic account.
In order to start collecting Redis metrics, you need to sign up for a free New Relic account.

<InlineSignup />

Once you've signed up, make sure you've set up:

* The [redis receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/redisreceiver) component, as the collector requires access to Redis through an endpoint. Minimum version recommended is v0.83.0.
* The [redis receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/redisreceiver) component, as the collector requires access to Redis through an endpoint. Minimum version recommended is v0.83.0.
* The OpenTelemetry collector following [OpenTelemetry docs](https://opentelemetry.io/docs/collector/getting-started/)


Expand All @@ -42,13 +42,13 @@ Once you've signed up, make sure you've set up:
You will need to install [OpenTelemetry Collector Contrib Distro](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib). If you're using another distribution, confirm that your chosen distribution has the following components:

* [Redis receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/redisreceiver)
* [OTLP exporter](https://pkg.go.dev/go.opentelemetry.io/collector/exporter/otlpexporter)
* [OTLP/HTTP exporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter)
* [Attribute processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/attributesprocessor/README.md)
* [Resource processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourceprocessor/README.md)
* [Resource detection processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md)

<Callout variant="important">
If your distribution does not have these components, then the config file in the next step does **not** apply.
If your distribution does not have these components, then the config file in the next step does **not** apply.

</Callout>

Expand All @@ -68,7 +68,7 @@ receivers:
enabled: true

processors:
# This is needed since redis receiver is not currently adding any means to understand to which redis server the metrics are referring to
# This is needed since redis receiver is not currently adding any means to understand to which redis server the metrics are referring to
attributes/redis_metrics:
include:
match_type: regexp
Expand Down Expand Up @@ -96,8 +96,8 @@ processors:
override: false

exporters:
otlp:
endpoint: https://otlp.nr-data.net:443
otlphttp:
endpoint: https://otlp.nr-data.net
headers:
api-key: <NEW_RELIC_LICENSE_KEY>

Expand All @@ -112,11 +112,11 @@ service:
- resourcedetection/cloud
- resource
- attributes/redis_metrics
exporters: [otlp]
exporters: [otlphttp]
```

* Replace the `NEW_RELIC_LICENSE_KEY` in the file with your own values. For more info, see the [New Relic License key](/docs/apis/intro-apis/new-relic-api-keys/#license-key).
* Since no identificator is attached by the OTel receiver to redis metrics, an attribute processor is needed to decorate metrics with `server.address` and `server.port` metadata. The attributes `server.address` and `server.port` are needed to be able to query and facet data differentiating between Redis servers and to create New Relic entities.
* Since no identifier is attached by the OTel receiver to redis metrics, an attribute processor is needed to decorate metrics with `server.address` and `server.port` metadata. The attributes `server.address` and `server.port` are needed to be able to query and facet data differentiating between Redis servers and to create New Relic entities.
* Moreover, separate pipelines with different instances of `resource/redis_metrics` are needed in case multiple Redis servers are monitored from a single otel collector to decorate each instance with the corresponding metadata.

To look at other configuration options, see:
Expand All @@ -127,7 +127,7 @@ To look at other configuration options, see:

</Step>
<Step>
### Run the collector
### Run the collector

Run the OpenTelemetry collector (the way to run it may vary depending on the chosen installation method). Example:

Expand All @@ -137,7 +137,7 @@ Run the OpenTelemetry collector (the way to run it may vary depending on the cho

</Step>
<Step>
### Explore your data
### Explore your data

Telemetry data originating from the OpenTelemetry Redis receiver, if properly decorated, generates redis entities.
[Entities](/docs/new-relic-solutions/new-relic-one/core-concepts/what-entity-new-relic/) are anything that reports data to New Relic and is identified by an unique entity ID.
Expand All @@ -147,7 +147,7 @@ Check this [document](/docs/new-relic-solutions/new-relic-one/core-concepts/new-

</Step>
<Step>
### Query your data with metrics explorer
### Query your data with metrics explorer

You may use the [metrics explorer](/docs/query-your-data/explore-query-data/browse-data/introduction-data-explorer) to check the metrics being ingested. All metrics reported by the redis receiver start by the `"redis."` prefix.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ receivers:
action: drop

exporters:
otlp:
endpoint: https://otlp.nr-data.net:4317
otlphttp:
endpoint: https://otlp.nr-data.net
headers:
api-key: NEW_RELIC_LICENSE_KEY
processors:
Expand All @@ -100,7 +100,7 @@ service:
metrics:
receivers: [prometheus]
processors: [batch, memory_limiter]
exporters: [otlp]
exporters: [otlphttp]
```

You may check [Opentelemetry Collector docs](https://opentelemetry.io/docs/collector/configuration/) and [Prometheus configuration docs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) for additional configuration details.
Expand Down
Loading
Loading