Skip to content

Commit

Permalink
add gRPC support for the service graph sample
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed May 24, 2024
1 parent a8049b1 commit 4062780
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion recipes/beyla-golden-signals/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
metric_statements:
- context: metric
statements:
# The in-context dashboard expects rpc_server_duration_count (without a unit suffix)
# Beyla sets the wrong unit for this metric, which results in the wrong metric name.
- set(unit, "") where name == "rpc.server.duration"
- context: datapoint
statements:
Expand Down
2 changes: 0 additions & 2 deletions recipes/beyla-service-graph/beyla-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ spec:
requests:
cpu: 10m
memory: 100Mi
limits:
memory: 500Mi
image: grafana/beyla:1.5.2
securityContext:
seccompProfile:
Expand Down
22 changes: 15 additions & 7 deletions recipes/beyla-service-graph/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,28 @@ spec:
http:
connectors:
# convert spans into a calls metric
spanmetrics/httpservicegraph:
spanmetrics/servicegraph:
histogram:
disable: true
dimensions:
- name: server.address
- name: client.address
exclude_dimensions: ['status.code', 'span.kind', 'span.name', 'service.name']
exclude_dimensions:
- 'status.code'
- 'span.kind'
- 'span.name'
- 'service.name'
- 'rpc.method'
- 'rpc.system'
- 'rpc.grpc.status_code'
- 'server.port'
processors:
# filter down to only non-local http server spans
filter/httpserveronly:
filter/serveronly:
error_mode: ignore
traces:
span:
- attributes["http.request.method"] == nil
- attributes["http.request.method"] == nil and attributes["rpc.method"] == nil
- kind.string != "Server"
- attributes["server.address"] == "127.0.0.1"
# detect gke resource attributes
Expand Down Expand Up @@ -112,10 +120,10 @@ spec:
pipelines:
traces:
receivers: [otlp]
processors: [filter/httpserveronly]
exporters: [spanmetrics/httpservicegraph]
processors: [filter/serveronly]
exporters: [spanmetrics/servicegraph]
metrics:
receivers: [spanmetrics/httpservicegraph]
receivers: [spanmetrics/servicegraph]
processors:
- groupbyattrs
- transform/k8spodname_to_server
Expand Down

0 comments on commit 4062780

Please sign in to comment.