Created
April 12, 2022 13:28
-
-
Save rajeshksv/5b8723440fda733d0ce9486a2f131bac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
receivers: | |
otlp: | |
protocols: | |
grpc: | |
# Collect own metrics | |
prometheus: | |
config: | |
scrape_configs: | |
- job_name: 'otel-collector' | |
scrape_interval: 30s | |
static_configs: | |
- targets: ['0.0.0.0:8888'] | |
processors: | |
memory_limiter: | |
check_interval: 1s | |
limit_mib: 4000 | |
spike_limit_mib: 800 | |
batch: | |
# Google Cloud Monitoring limits batches to 200 metric points. | |
send_batch_max_size: 200 | |
send_batch_size: 200 | |
resourcedetection: | |
detectors: | |
- gce | |
- env | |
metricstransform/custom: | |
transforms: | |
- action: update | |
include: ^(.*)$$ | |
match_type: regexp | |
new_name: custom.googleapis.com/$${1} | |
extensions: | |
health_check: {} | |
exporters: | |
googlecloud: | |
metric: | |
resource_filters: | |
prefix: fcp_ | |
logging: | |
loglevel: debug | |
file: | |
path: /tmp/metrics.json | |
service: | |
extensions: [health_check] | |
telemetry: | |
logs: | |
level: debug | |
output_paths: ["stdout", "/tmp/otelcol"] | |
pipelines: | |
metrics: | |
receivers: [otlp, prometheus] | |
processors: [memory_limiter, batch, resourcedetection, metricstransform/custom] | |
exporters: [googlecloud, logging, file] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment