Docs » µAPM Instrumentation Guide » Inferred Services Instrumentation

Inferred Services Instrumentation 🔗

Important

Before you start instrumenting your applications, review the information in Instrumentation Overview.

There are times when a remote service may not have tracing enabled, either because it is not instrumented yet, or because instrumentation is not possible. In these cases, it is possible for SignalFx to infer the presence of a remote service, if the span that calls the remote service has the proper information. For a span to be evaluated for possible inferred services, it must have a KIND of CLIENT or PRODUCER. If a span is a CLIENT, it will be checked for possible HTTP, DATABASE, or CACHE remote service calls. If a span is a PRODUCER, it will be checked for PUBSUB remote calls.

For details on viewing an inferred service in the SignalFx UI, see Inferred Services.

Span Tags 🔗

For each type of inferred service, there are specific tags that are evaluated to determine the name of the remote service.

Note

If you are using SignalFx auto-instrumentation, these tags will be added to your spans automatically.

HTTP 🔗

For a remote HTTP call, one of the following tags are required. They will be considered in the order listed here, and the first tag that is found will be used to determine the name of the remote service

  • peer.service
    • This tag is the suggested way to denote a remote service, according to OpenTracing Semantics.
    • If this tag is found, the value will be used as the name of the remote service, without modification.
  • peer.hostname
    • This tag is used to provide the hostname of a remote connection. Can be used for remote HTTP connections or remote database connections.
    • The value of this tag should only contain the hostname of the remote connection, not a full url.
    • The value of this tag will be used as the name of the remote service without modification.
  • peer.address
    • This tag is used to provide the address of a remote connection. According to OpenTracing Semantics, this value could be a url, an IP address, a JDBC connection string, etc.
    • For remote HTTP services, this value is expected to be a valid HTTP url.
    • IP addresses will not be used to determine the name or presence of a remote service.
    • If a valid HTTP url is found, the hostname will be used as the name of the remote service.
  • http.url
    • This tag is used to provide the url of a remote connection.
    • This value is expected to be a valid HTTP url.
    • If a valid HTTP url is found, the hostname will be used as the name of the remote service.

Note

For tag values that expect a url, IP addresses will not be considered. If an IP address is found, the tag will be treated as if it is not present.

Database 🔗

For a remote DATABASE call, the following tags are used to determine the name of the remote database service

  • db.instance
    • This tag is used to specify which database is being used.
    • The value of this tag should be the logical database name, not a specific instance.
      • i.e. value should be users, instead of users-1, users-2, …
    • This tag is required to determine the presence of a remote DATABASE service.
    • The value of this tag will be used as the name of the remote service.
  • db.type
    • This tag is used to specify the type of database that is being queried, e.g. mysql, redis, etc.
    • This tag is optional.
    • If this tag is present, the value will be used as part of the remote service name.

Cache 🔗

A remote CACHE service is a special subset of the DATABASE service. It has the same conditions as a DATABASE service, but with db.type=memcached.

Publish/Subscribe 🔗

For a remote PUBSUB queue, the following tags are used to determine the name of the remote PUBSUB service. One of message_bus.destination or topic is required.

  • message_bus.destination
    • This tag is used to specify the name of the topic or channel that messages are being sent to.
    • The value of this tag will be used as the name of the remote service.
  • topic
    • This tag is used to specify the name of the topic or channel that messages are being sent to.
    • The value of this tag will be used as the name of the remote service.
  • peer.service
    • This tag is used to specify the logical service name of the message queue.
    • This tag is optional.
    • If this tag is present, the value will be used as part of the remote service name.