Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions entity-types/infra-haproxyinstance/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ synthesis:
haproxy.addr:
# HAProxy-specific attributes (natively emitted by haproxyreceiver)
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
haproxy.service_name:
# Environment attributes (from resourcedetection processor)
os.type:
Expand Down Expand Up @@ -86,6 +88,8 @@ synthesis:
haproxy.addr:
# HAProxy-specific attributes (natively emitted by haproxyreceiver)
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
haproxy.service_name:
# Environment attributes (from resourcedetection processor)
os.type:
Expand Down Expand Up @@ -138,6 +142,8 @@ synthesis:
ttl: P1D
haproxy.addr:
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
haproxy.service_name:
os.type:
host.id:
Expand Down Expand Up @@ -184,6 +190,8 @@ synthesis:
ttl: P1D
haproxy.addr:
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
haproxy.service_name:
os.type:
host.id:
Expand Down Expand Up @@ -260,6 +268,8 @@ synthesis:
haproxy.instance.id:
haproxy.addr:
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
host.name:
ttl: P1D
host.id:
Expand Down Expand Up @@ -300,6 +310,8 @@ synthesis:
haproxy.instance.id:
haproxy.addr:
haproxy.proxy_name:
# Relationship join key (label-based); indexed by the HAPROXYINSTANCE candidate.
haproxy.deployment.name:
host.name:
ttl: P1D
host.id:
Expand Down Expand Up @@ -327,6 +339,7 @@ goldenTags:
- host.id
- host.name
- haproxy.addr
- haproxy.deployment.name
- os.type
- cloud.provider
- cloud.region
Expand Down
1 change: 1 addition & 0 deletions entity-types/infra-haproxyinstance/tests/Metric.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"haproxy.addr": "http://127.0.0.1:8404/stats",
"haproxy.proxy_name": "http_front",
"haproxy.service_name": "FRONTEND",
"haproxy.deployment.name": "haproxy-demo-lb",
"description": "Number of connections over the last elapsed second (frontend). Corresponds to HAProxy's conn_rate metric.",
"instrumentation.provider": "opentelemetry",
"metricName": "haproxy.connections.rate",
Expand Down
19 changes: 19 additions & 0 deletions relationships/candidates/HAPROXYINSTANCE.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
category: HAPROXYINSTANCE
lookups:
# Deployment-name lookup — indexes the HAPROXYINSTANCE entity by its
# haproxy.deployment.name join tag (label-based / Option 5). Both relationship
# directions resolve against this single field; the join value is identical on
# the client side (tags.haproxy.deployment.name) and the backend side
# (tags.haproxy.upstream.deployment.name).
- entityTypes:
- domain: INFRA
type: HAPROXYINSTANCE
tags:
matchingMode: ALL
predicates:
- tagKeys: ["haproxy.deployment.name"]
field: deploymentName
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
relationships:
# OTel client service → HAPROXYINSTANCE (CALLS), label-based.
# The client (e.g. haproxy-frontend) declares which HAProxy it calls via
# OTEL_RESOURCE_ATTRIBUTES=tags.haproxy.deployment.name=<name>
# Note the key: on HAProxy the *client* carries haproxy.deployment.name
- name: otelExtServiceCallsHaproxyInstanceByDeploymentLabelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: eventType
anyOf: [ "Metric" ]
- attribute: newrelic.source
anyOf: [ "api.metrics.otlp" ]
- attribute: entity.type
anyOf: [ "SERVICE" ]
- attribute: tags.haproxy.deployment.name
present: true
relationship:
expires: PT75M
relationshipType: CALLS
source:
extractGuid:
attribute: entity.guid
target:
lookupGuid:
candidateCategory: HAPROXYINSTANCE
fields:
- field: deploymentName
attribute: tags.haproxy.deployment.name
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
relationships:
# HAPROXYINSTANCE → OTel backend service (CALLS), label-based.
# The backend (e.g. haproxy-backend-8001/8002) declares the HAProxy that fronts
# it via
# OTEL_RESOURCE_ATTRIBUTES=tags.haproxy.upstream.deployment.name=<name>
# ("upstream" = the load balancer in front of the backend). Note the key: on
# HAProxy the *backend* carries haproxy.upstream.deployment.name
- name: haproxyInstanceCallsOtelExtServiceByUpstreamLabelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: eventType
anyOf: [ "Metric" ]
- attribute: newrelic.source
anyOf: [ "api.metrics.otlp" ]
- attribute: entity.type
anyOf: [ "SERVICE" ]
- attribute: tags.haproxy.upstream.deployment.name
present: true
relationship:
expires: PT75M
relationshipType: CALLS
source:
lookupGuid:
candidateCategory: HAPROXYINSTANCE
fields:
- field: deploymentName
attribute: tags.haproxy.upstream.deployment.name
target:
extractGuid:
attribute: entity.guid
Loading