Skip to content

Commit

Permalink
Add Prometheus configuration for tour-of-heroes-api and jaeger
Browse files Browse the repository at this point in the history
  • Loading branch information
0GiS0 committed Dec 19, 2023
1 parent d120ab8 commit e1754a4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 30 deletions.
55 changes: 33 additions & 22 deletions .devcontainer/otel-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,34 @@ receivers:
protocols:
grpc:
http:
prometheus:
config:
scrape_configs:
- job_name: "tour-of-heroes-api"
scrape_interval: 5s
static_configs:
- targets: ["app:5010"]
- job_name: "jaeger"
scrape_interval: 5s
static_configs:
- targets: ["jaeger:14269"]

################################ Receivers ##################################################################################################
# #
# postgresql riak wavefront webhookevent zookeeper couchdb jaeger vcenter windowsperfcounters journald solace #
# collectd file azuremonitor nsxt apachespark awscloudwatch httpcheck memcached oracledb udplog chrony cloudflare expvar googlecloudspanner #
# podman_stats sqlquery tcplog snmp awsecscontainermetrics azureblob kafkametrics kubeletstats loki rabbitmq redis k8s_events k8sobjects #
# docker_stats influxdb iis opencensus otlpjsonfile purefb apache bigip syslog pulsar sqlserver nginx kafka mongodb windowseventlog #
# awscontainerinsightreceiver elasticsearch filelog aerospike awsxray filestats hostmetrics skywalking azureeventhub carbon mysql #
# docker_stats influxdb iis opencensus otlpjsonfile purefb apache bigip syslog pulsar sqlserver nginx kafka mongodb windowseventlog #
# awscontainerinsightreceiver elasticsearch filelog aerospike awsxray filestats hostmetrics skywalking azureeventhub carbon mysql #
# receiver_creator sapm haproxy mongodbatlas snowflake sshcheck statsd k8s_cluster prometheus cloudfoundry flinkmetrics jmx signalfx #
# prometheus_simple otlp awsfirehose fluentforward googlecloudpubsub purefa splunk_hec zipkin active_directory_ds datadog #
# #
# prometheus_simple otlp awsfirehose fluentforward googlecloudpubsub purefa splunk_hec zipkin active_directory_ds datadog #
# #
##############################################################################################################################################

# Exporters send data to one or more backends or destinations
exporters:
debug:
# verbosity: detailed
verbosity: detailed
prometheus:
endpoint: "0.0.0.0:8889"
otlp:
Expand All @@ -29,24 +40,24 @@ exporters:
insecure: true
loki:
endpoint: http://loki:3100/loki/api/v1/push
# azuremonitor:
# # connection_string: "<INSTRUMENTATION_KEY>"
azuremonitor:
connection_string: "InstrumentationKey=69fe3e46-bba9-4142-8e2e-bc071e29f4ab;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/"

############################# Exporters #######################################################################################################
# #
# prometheus otlp alibabacloud_logservice azuredataexplorer carbon clickhouse logicmonitor mezmo debug logging awsemf loadbalancing #
# syslog dataset file googlemanagedprometheus influxdb signalfx sumologic cassandra dynatrace googlecloud logzio pulsar otlphttp awsxray #
# elasticsearch honeycombmarker kafka sentry zipkin awscloudwatchlogs instana loki skywalking splunk_hec awskinesis awss3 azuremonitor #
# elasticsearch honeycombmarker kafka sentry zipkin awscloudwatchlogs instana loki skywalking splunk_hec awskinesis awss3 azuremonitor #
# datadog f5cloud googlecloudpubsub prometheusremotewrite tanzuobservability tencentcloud_logservice coralogix opencensus sapm #
# #
# #
###############################################################################################################################################

# A connector acts as an exporter to one pipeline and a receiver to another
connectors:
spanmetrics:
histogram:
explicit:
buckets: [ 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1000ms ]
# connectors:
# spanmetrics:
# histogram:
# explicit:
# buckets: [ 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1000ms ]

# Processors are used to transform data
# https://opentelemetry.io/docs/collector/transforming-telemetry/
Expand All @@ -67,12 +78,12 @@ processors:
service:
pipelines:
traces:
receivers: [ otlp ]
exporters: [ debug, otlp, spanmetrics ]
receivers: [otlp]
exporters: [debug, otlp, azuremonitor]
metrics:
receivers: [ spanmetrics ]
exporters: [ debug, prometheus ]
receivers: [prometheus]
exporters: [debug, prometheus, azuremonitor]
logs:
receivers: [ otlp ]
processors: [ resource ]
exporters: [ debug, loki ]
receivers: [otlp]
processors: [resource]
exporters: [debug, loki, azuremonitor]
16 changes: 8 additions & 8 deletions .devcontainer/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ scrape_configs:
- targets:
- otel-collector:8889

- job_name: jaeger
static_configs:
- targets:
- jaeger:14269
- job_name: services
static_configs:
- targets:
- app:5010
# - job_name: jaeger
# static_configs:
# - targets:
# - jaeger:14269
# - job_name: services
# static_configs:
# - targets:
# - app:5010

0 comments on commit e1754a4

Please sign in to comment.