Skip to content

Commit

Permalink
[Service Representation] Document precedence order of peer attributes (
Browse files Browse the repository at this point in the history
…#26520)

* document precedence order of peer attributes

* Apply suggestions from code review

Co-authored-by: Esther Kim <[email protected]>

---------

Co-authored-by: Esther Kim <[email protected]>
  • Loading branch information
dussault-antoine and estherk15 authored Nov 27, 2024
1 parent b212d96 commit 9e93684
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions content/en/tracing/services/inferred_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ Peer Tag | Source Attributes

**Note**: Peer attribute values that match IP address formats (for example, 127.0.0.1) are modified and redacted with `blocked-ip-address` to prevent unnecessary noise and tagging metrics with high-cardinality dimensions. As a result, you may encounter some `blocked-ip-address` services appearing as downstream dependencies of your instrumented services.

#### Precedence of peer tags

To assign the name to inferred entities, Datadog uses a specific order of precedence between peer tags, when entities are defined by a combination of multiple tags.

Entity type | Order of precedence
-----------|----------------
Database | `peer.db.name` > `peer.aws.s3.bucket` (For AWS S3) / `peer.aws.dynamodb.table` (For AWS DynamoDB) / `peer.cassandra.contact.points` (For Cassandra) / `peer.couchbase.seed.nodes` (For Couchbase) > `peer.hostname` > `peer.db.system`
Queue | `peer.messaging.destination` > `peer.kafka.bootstrap.servers` (for Kafka) / `peer.aws.sqs.queue` (for AWS SQS) / `peer.aws.kinesis.stream` (For AWS Kinesis) > `peer.messaging.system`
Inferred service | `peer.service` > `peer.rpc.service` > `peer.hostname`

If the highest priority tag, such as `peer.db.name`, is not captured as part of the instrumentation, Datadog uses the second highest priority tag, like `peer.hostname`, and continue in that order.

**Note**: Datadog never sets the `peer.service` for inferred databases and queues. `peer.service` is the highest priority peer attribute. If set, it take precedence over all other attributes.

## Migrate to global default service naming

With inferred services, service dependencies are automatically detected from existing span attributes. As a result, changing service names (using the `service` tag) is not required to identify these dependencies.
Expand Down

0 comments on commit 9e93684

Please sign in to comment.