Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
Alex Boten committed Jun 21, 2023
1 parent 94c06e9 commit 51cca95
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
// authprinter:
// attribute: subject
// exporters:
// logging:
// debug:
// service:
// extensions: [oidc]
// pipelines:
// traces:
// receivers: [otlp]
// processors: [authprinter]
// exporters: [logging]
// exporters: [debug]
package client // import "go.opentelemetry.io/collector/client"

import (
Expand Down
4 changes: 2 additions & 2 deletions cmd/builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ processors:
batch:

exporters:
logging:
debug:

service:
pipelines:
Expand All @@ -44,7 +44,7 @@ service:
processors:
- batch
exporters:
- logging
- debug
EOF
$ /tmp/dist/otelcol-custom --config=/tmp/otelcol.yaml
```
Expand Down
4 changes: 2 additions & 2 deletions cmd/builder/test/core.otel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ receivers:
processors:

exporters:
logging:
debug:

service:
extensions: [zpages]
Expand All @@ -19,4 +19,4 @@ service:
- otlp
processors: []
exporters:
- logging
- debug
4 changes: 2 additions & 2 deletions cmd/builder/test/default.otel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ receivers:
processors:

exporters:
logging:
debug:

service:
extensions: [zpages]
Expand All @@ -19,4 +19,4 @@ service:
- otlp
processors: []
exporters:
- logging
- debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ processors:
check_interval: 5s

exporters:
logging:
debug:
loglevel: debug

service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]

extensions: [memory_ballast, zpages]
18 changes: 9 additions & 9 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ receivers:
regex: '.*grpc_io.*'
action: drop
exporters:
logging:
debug:
service:
pipelines:
metrics:
receivers: [prometheus]
processors: []
exporters: [logging]
exporters: [debug]
```

### zPages
Expand All @@ -109,21 +109,21 @@ extensions:
exporters](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#general-information)
can be configured to inspect the data being processed by the Collector.

For live troubleshooting purposes consider leveraging the `logging` exporter,
For live troubleshooting purposes consider leveraging the `debug` exporter,
which can be used to confirm that data is being received, processed and
exported by the Collector.

```yaml
receivers:
zipkin:
exporters:
logging:
debug:
service:
pipelines:
traces:
receivers: [zipkin]
processors: []
exporters: [logging]
exporters: [debug]
```

Get a Zipkin payload to test. For example create a file called `trace.json`
Expand Down Expand Up @@ -161,21 +161,21 @@ $ curl -X POST localhost:9411/api/v2/spans -H'Content-Type: application/json' -d
You should see a log entry like the following from the Collector:

```
2020-11-11T04:12:33.089Z INFO loggingexporter/logging_exporter.go:296 TraceExporter {"#spans": 1}
2020-11-11T04:12:33.089Z INFO debugexporter/debug_exporter.go:296 TraceExporter {"#spans": 1}
```

You can also configure the `logging` exporter so the entire payload is printed:
You can also configure the `debug` exporter so the entire payload is printed:

```yaml
exporters:
logging:
debug:
verbosity: detailed
```

With the modified configuration if you re-run the test above the log output should look like:

```
2020-11-11T04:08:17.344Z DEBUG loggingexporter/logging_exporter.go:353 ResourceSpans #0
2020-11-11T04:08:17.344Z DEBUG debugexporter/debug_exporter.go:353 ResourceSpans #0
Resource labels:
-> service.name: Str(api)
ScopeSpans #0
Expand Down
6 changes: 3 additions & 3 deletions examples/local/otel-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ processors:
check_interval: 5s

exporters:
logging:
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]

extensions: [memory_ballast, zpages]
6 changes: 3 additions & 3 deletions service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `--config` flag accepts either a file path or values in the form of a config
Currently, the OpenTelemetry Collector supports the following providers `scheme`:
- [file](../confmap/provider/fileprovider/provider.go) - Reads configuration from a file. E.g. `file:path/to/config.yaml`.
- [env](../confmap/provider/envprovider/provider.go) - Reads configuration from an environment variable. E.g. `env:MY_CONFIG_IN_AN_ENVVAR`.
- [yaml](../confmap/provider/yamlprovider/provider.go) - Reads configuration from yaml bytes. E.g. `yaml:exporters::logging::loglevel: debug`.
- [yaml](../confmap/provider/yamlprovider/provider.go) - Reads configuration from yaml bytes. E.g. `yaml:exporters::debug::verbosity: debug`.
- [http](../confmap/provider/httpprovider/provider.go) - Reads configuration from a HTTP URI. E.g. `http://www.example.com`

For more technical details about how configuration is resolved you can read the [configuration resolving design](../confmap/README.md#configuration-resolving).
Expand All @@ -32,9 +32,9 @@ For more technical details about how configuration is resolved you can read the

`./otelcorecol --config=file:examples/local/otel-config.yaml --config=env:MY_OTHER_CONFIG`

2. Merge a `config.yaml` file with the content of a yaml bytes configuration (overwrites the `exporters::logging::loglevel` config) and use the content as the config:
2. Merge a `config.yaml` file with the content of a yaml bytes configuration (overwrites the `exporters::debug::verbosity` config) and use the content as the config:

`./otelcorecol --config=file:examples/local/otel-config.yaml --config="yaml:exporters::logging::loglevel: info"`
`./otelcorecol --config=file:examples/local/otel-config.yaml --config="yaml:exporters::debug::verbosity: info"`

### Embedding other configuration providers

Expand Down

0 comments on commit 51cca95

Please sign in to comment.