Skip to content

Commit

Permalink
otlp: Refine documentation (#4695)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Nov 8, 2023
1 parent 0f5179f commit 0c5ebd5
Show file tree
Hide file tree
Showing 14 changed files with 380 additions and 227 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Fix improper parsing of characters such us `+`, `\` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667)
- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648)
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695)
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695)

## [1.19.0/0.42.0/0.0.7] 2023-09-28

Expand Down
18 changes: 10 additions & 8 deletions exporters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ This package contains exporters for this purpose.

The following exporter packages are provided with the following OpenTelemetry signal support.

| Exporter Package | Metrics | Traces |
| :-----------------------------------------------------------------------------: | :-----: | :----: |
| [go.opentelemetry.io/otel/exporters/otlp/otlpmetric](./otlp/otlpmetric) || |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](./otlp/otlptrace) | ||
| [go.opentelemetry.io/otel/exporters/prometheus](./prometheus) || |
| [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](./stdout/stdoutmetric) || |
| [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](./stdout/stdouttrace) | ||
| [go.opentelemetry.io/otel/exporters/zipkin](./zipkin) | ||
| Exporter Package | Metrics | Traces |
|:-----------------------------------------------------------------------------------------------------:|:-------:|:------:|
| [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](./otlp/otlpmetric/otlpmetricgrpc) || |
| [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](./otlp/otlpmetric/otlpmetrichttp) || |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](./otlp/otlptrace/otlptracegrpc) | ||
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](./otlp/otlptrace/otlptracehttp) | ||
| [go.opentelemetry.io/otel/exporters/prometheus](./prometheus) || |
| [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](./stdout/stdoutmetric) || |
| [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](./stdout/stdouttrace) | ||
| [go.opentelemetry.io/otel/exporters/zipkin](./zipkin) | ||

See the [OpenTelemetry registry] for 3rd-party exporters compatible with this project.

Expand Down
42 changes: 0 additions & 42 deletions exporters/otlp/otlpmetric/otlpmetricgrpc/README.md

This file was deleted.

8 changes: 1 addition & 7 deletions exporters/otlp/otlpmetric/otlpmetricgrpc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,7 @@ func compressorToCompression(compressor string) oconf.Compression {
}

// WithCompressor sets the compressor the gRPC client uses.
//
// It is the responsibility of the caller to ensure that the compressor set
// has been registered with google.golang.org/grpc/encoding (see
// encoding.RegisterCompressor for more information). For example, to register
// the gzip compressor import the package:
//
// import _ "google.golang.org/grpc/encoding/gzip"
// Supported compressor values: "gzip".
//
// If the OTEL_EXPORTER_OTLP_COMPRESSION or
// OTEL_EXPORTER_OTLP_METRICS_COMPRESSION environment variable is set, and
Expand Down
83 changes: 81 additions & 2 deletions exporters/otlp/otlpmetric/otlpmetricgrpc/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,85 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package otlpmetricgrpc provides an otlpmetric.Exporter that communicates
// with an OTLP receiving endpoint using gRPC.
/*
Package otlpmetricgrpc provides an OTLP metrics exporter using gRPC.
By default the telemetry is sent to https://localhost:4317.
Exporter should be created using [New] and used with a [metric.PeriodicReader].
The environment variables described below can be used for configuration.
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT (default: "https://localhost:4317") -
target to which the exporter sends telemetry.
The target syntax is defined in https://github.com/grpc/grpc/blob/master/doc/naming.md.
The value must contain a host.
The value may additionally a port, a scheme, and a path.
The value accepts "http" and "https" scheme.
The value should not contain a query string or fragment.
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT takes precedence over OTEL_EXPORTER_OTLP_ENDPOINT.
The configuration can be overridden by [WithEndpoint], [WithInsecure], [WithGRPCConn] options.
OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_METRICS_INSECURE (default: "false") -
setting "true" disables client transport security for the exporter's gRPC connection.
You can use this only when an endpoint is provided without the http or https scheme.
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT setting overrides
the scheme defined via OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.
OTEL_EXPORTER_OTLP_METRICS_INSECURE takes precedence over OTEL_EXPORTER_OTLP_INSECURE.
The configuration can be overridden by [WithInsecure], [WithGRPCConn] options.
OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS (default: none) -
key-value pairs used as gRPC metadata associated with gRPC requests.
The value is expected to be represented in a format matching to the [W3C Baggage HTTP Header Content Format],
except that additional semi-colon delimited metadata is not supported.
Example value: "key1=value1,key2=value2".
OTEL_EXPORTER_OTLP_METRICS_HEADERS takes precedence over OTEL_EXPORTER_OTLP_HEADERS.
The configuration can be overridden by [WithHeaders] option.
OTEL_EXPORTER_OTLP_TIMEOUT, OTEL_EXPORTER_OTLP_METRICS_TIMEOUT (default: "10000") -
maximum time in milliseconds the OTLP exporter waits for each batch export.
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT takes precedence over OTEL_EXPORTER_OTLP_TIMEOUT.
The configuration can be overridden by [WithTimeout] option.
OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_METRICS_COMPRESSION (default: none) -
the gRPC compressor the exporter uses.
Supported value: "gzip".
OTEL_EXPORTER_OTLP_METRICS_COMPRESSION takes precedence over OTEL_EXPORTER_OTLP_COMPRESSION.
The configuration can be overridden by [WithCompressor], [WithGRPCConn] options.
OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE (default: none) -
the filepath to the trusted certificate to use when verifying a server's TLS credentials.
OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CERTIFICATE.
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE (default: none) -
the filepath to the client certificate/chain trust for clients private key to use in mTLS communication in PEM format.
OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE.
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
OTEL_EXPORTER_OTLP_CLIENT_KEY, OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY (default: none) -
the filepath to the clients private key to use in mTLS communication in PEM format.
OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY takes precedence over OTEL_EXPORTER_OTLP_CLIENT_KEY.
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] option.
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE (default: "cumulative") -
aggregation temporality to use on the basis of instrument kind. Supported values:
- "cumulative" - Cumulative aggregation temporality for all instrument kinds,
- "delta" - Delta aggregation temporality for Counter, Asynchronous Counter and Histogram instrument kinds;
Cumulative aggregation for UpDownCounter and Asynchronous UpDownCounter instrument kinds,
- "lowmemory" - Delta aggregation temporality for Synchronous Counter and Histogram instrument kinds;
Cumulative aggregation temporality for Synchronous UpDownCounter, Asynchronous Counter, and Asynchronous UpDownCounter instrument kinds.
The configuration can be overridden by [WithTemporalitySelector] option.
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION (default: "explicit_bucket_histogram") -
default aggregation to use for histogram instruments. Supported values:
- "explicit_bucket_histogram" - [Explicit Bucket Histogram Aggregation],
- "base2_exponential_bucket_histogram" - [Base2 Exponential Bucket Histogram Aggregation].
The configuration can be overridden by [WithAggregationSelector] option.
[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
[Explicit Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation
[Base2 Exponential Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#base2-exponential-bucket-histogram-aggregation
*/
package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
43 changes: 0 additions & 43 deletions exporters/otlp/otlpmetric/otlpmetrichttp/README.md

This file was deleted.

Loading

0 comments on commit 0c5ebd5

Please sign in to comment.