Skip to content

Commit

Permalink
Update SignalFx docs and example to support events (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
flands committed Sep 29, 2020
1 parent 25d5e48 commit 7f52fd7
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 24 deletions.
14 changes: 3 additions & 11 deletions examples/tracing/otel-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,27 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:55680
zipkin:
endpoint: 0.0.0.0:9411

exporters:
jaeger_thrift:
url: "http:https://jaeger:14268/api/traces"
logging:

zipkin:
endpoint: "http:https://zipkin:9411/api/v2/spans"
format: proto

jaeger_thrift:
url: "http:https://jaeger:14268/api/traces"

processors:
batch:
queued_retry:

extensions:
health_check:
pprof:
endpoint: :1888
zpages:
endpoint: :55679

service:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [otlp, zipkin]
exporters: [zipkin, jaeger_thrift, logging]
processors: [batch, queued_retry]
processors: [batch]
9 changes: 6 additions & 3 deletions exporter/sapmexporter/examples/signalfx-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ processors:
#- key: environment
#value: "YOUR_ENVIRONMENT_NAME"
#action: insert
queued_retry:
# Enabling the memory_limiter is strongly recommended for every pipeline.
# Configuration is based on the amount of memory allocated to the collector.
# The configuration below assumes 2GB of memory. In general, the ballast
Expand All @@ -60,18 +59,22 @@ exporters:
sapm:
access_token: "YOUR_ACCESS_TOKEN"
endpoint: "https://ingest.YOUR_SIGNALFX_REALM.signalfx.com/v2/trace"
# Metrics
# Metrics + Events
signalfx:
access_token: "YOUR_ACCESS_TOKEN"
realm: "YOUR_SIGNALFX_REALM"
service:
pipelines:
traces:
receivers: [sapm, zipkin]
processors: [memory_limiter, batch, queued_retry]
processors: [memory_limiter, batch]
exporters: [sapm]
metrics:
receivers: [signalfx, prometheus]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
extensions: [health_check, zpages]
9 changes: 6 additions & 3 deletions exporter/sapmexporter/examples/signalfx-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ data:
#- key: environment
#value: "YOUR_ENVIRONMENT_NAME"
#action: insert
queued_retry:
# Enabling the memory_limiter is strongly recommended for every pipeline.
# Configuration is based on the amount of memory allocated to the collector.
# The configuration below assumes 2GB of memory. In general, the ballast
Expand Down Expand Up @@ -79,12 +78,16 @@ data:
pipelines:
traces:
receivers: [sapm, zipkin]
processors: [memory_limiter, batch, queued_retry]
processors: [memory_limiter, batch]
exporters: [sapm]
metrics:
receivers: [signalfx, prometheus]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -133,7 +136,7 @@ spec:
- "--config=/conf/otel-collector-config.yaml"
# Memory Ballast size should be max 1/3 to 1/2 of memory.
- "--mem-ballast-size-mib=683"
image: otel/opentelemetry-collector-contrib:0.8.0
image: otel/opentelemetry-collector-contrib:0.11.0
name: otel-collector
resources:
limits:
Expand Down
17 changes: 16 additions & 1 deletion exporter/signalfxexporter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SignalFx Metrics Exporter

This exporter can be used to send metrics to SignalFx.
This exporter can be used to send metrics and events to SignalFx.

Apart from metrics, the exporter is also capable of sending metric metadata
(properties and tags) to SignalFx. Currently, only metric metadata updates from
Expand Down Expand Up @@ -68,6 +68,21 @@ exporters:
timeout: 5s
```

> :warning: When enabling the SignalFx receiver or exporter, configure both the `metrics` and `logs` pipelines.
```yaml
service:
pipelines:
metrics:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
```

Beyond standard YAML configuration as outlined in the sections that follow,
exporters that leverage the net/http package (all do today) also respect the
following proxy environment variables:
Expand Down
2 changes: 1 addition & 1 deletion processor/routingprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Config struct {

// FromAttribute contains the attribute name to look up the route value. This attribute should be part of the context propagated
// down from the previous receivers and/or processors. If all the receivers and processors are propagating the entire context correctly,
// this could be the HTTP/gRPC header from the original request/RPC. Typically, aggregation processors (batch, queued_retry, groupbytrace)
// this could be the HTTP/gRPC header from the original request/RPC. Typically, aggregation processors (batch, groupbytrace)
// will create a new context, so, those should be avoided when using this processor.Although the HTTP spec allows headers to be repeated,
// this processor will only use the first value.
// Required.
Expand Down
30 changes: 25 additions & 5 deletions receiver/signalfxreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# SignalFx Receiver

The SignalFx receiver accepts metrics in the [SignalFx proto
format](https://github.com/signalfx/com_signalfx_metrics_protobuf). This allows
the collector to receiver metrics from other collectors or the SignalFx Smart
Agent.
The SignalFx receiver accepts:

- Metrics in the [SignalFx proto
format](https://github.com/signalfx/com_signalfx_metrics_protobuf).
- Events (Logs) in the [SignalFx proto
format](https://github.com/signalfx/com_signalfx_metrics_protobuf/blob/master/proto/signalfx_metrics.proto#L137).
More information about sending custom events can be found in the [SignalFx
Developers
Guide](https://developers.signalfx.com/ingest_data_reference.html#tag/Send-Custom-Events).

## Configuration

Expand Down Expand Up @@ -39,4 +44,19 @@ receivers:
```

The full list of settings exposed for this receiver are documented [here](./config.go)
with detailed sample configurations [here](./testdata/config.yaml).
with detailed sample configurations [here](./testdata/config.yaml).

> :warning: When enabling the SignalFx receiver or exporter, configure both the `metrics` and `logs` pipelines.
```yaml
service:
pipelines:
metrics:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
```

0 comments on commit 7f52fd7

Please sign in to comment.