Usage Attribution - Private Preview¶
Note
This is a private preview feature. Please contact your Observe representative for more information or open Docs & Support → Contact Support in the product and let us know.
Usage Attribution helps you understand and allocate your Observe usage across teams, environments, and services. With this feature, you can answer questions such as:
Which teams are responsible for the most log or metric volume?
How much data does each environment or service contribute?
Are there spikes in ingest tied to specific workloads?
Before this feature, many customers built custom solutions to achieve charge-back or show-back models internally. These often relied on naming conventions (such as datastream token names) or manually built dashboards. Usage Attribution brings this into the product natively, with support for standardized resource attributes like:
deployment.environment.name
service.name
team.name
See the full list of auto-discovered attributes here.
Limitations¶
Anything collected through the Observe Agent running on a host with the following configuration will automatically add the attributes below to its data:
resource_attributes:
deployment.environment.name: prod
service.name: recommendation
team.name: ai
Data collected by filedrop or poller is not yet covered by Usage Attribution.
Where to Find Usage Attribution¶
You can find Usage Attribution under the Workspace settings page in Observe.
Recommended Approach¶
Use the Add Data for Kubernetes and Add Data for Host (Linux, Windows, and macOS) flows with the Observe Agent. These automatically set default annotations and collect them as resource attributes. You can then slice and dice your usage by:
deployment.environment.name
service.name
team.name
This approach is simpler and more reliable than building ad-hoc models based on token names or dashboards.
Adding team.name
in Kubernetes¶
You can add a team.name
annotation to any Kubernetes workload. For example, if the recommendation
Deployment is owned by the ai team:
Patch the Deployment’s pod template (so new pods get the annotation):
kubectl -n default patch deployment recommendation \\
--type='merge' \\
-p '{"spec":{"template":{"metadata":{"annotations":{"resource.opentelemetry.io/team.name":"ai"}}}}}'
apiVersion: apps/v1
kind: Deployment
metadata:
name: recommendation
namespace: default
spec:
template:
metadata:
annotations:
resource.opentelemetry.io/team.name: ai
Roll the Deployment so pods pick it up:
kubectl -n default rollout restart deployment recommendation
kubectl -n default rollout status deployment recommendation
Verify the annotation on a new pod:
# List the new pod(s)
kubectl -n default get pods
# Check the annotation
kubectl -n default get pod <pod-name> -o yaml | grep 'resource.opentelemetry.io/team.name'
After applying this change, the attribute will be available in Observe, allowing you to break down usage by team in Usage Attribution.
Reference: Auto-Discovered Attributes¶
Observe automatically attempts to discover and standardize common resource attributes from telemetry data. Below is the full list of attributes that Observe tries to auto-discover:
{
"k8s.cluster.name": "k8s.cluster.name",
"k8s.cluster.uid": "k8s.cluster.uid",
"k8s.namespace.name": "k8s.namespace.name",
"k8s.pod.name": "k8s.pod.name",
"k8s.pod.uid": "k8s.pod.uid",
"k8s.pod.start_time": "k8s.pod.start_time",
"k8s.deployment.name": "k8s.deployment.name",
"k8s.replicaset.name": "k8s.replicaset.name",
"k8s.statefulset.name": "k8s.statefulset.name",
"k8s.daemonset.name": "k8s.daemonset.name",
"k8s.cronjob.name": "k8s.cronjob.name",
"k8s.job.name": "k8s.job.name",
"k8s.node.name": "k8s.node.name",
"k8s.node.uid": "k8s.node.uid",
"k8s.container.name": "k8s.container.name",
"container.id": "container.id",
"container.image.name": "container.image.name",
"container.image.tag": "container.image.tag",
"cloud.account.id": "cloud.account.id",
"cloud.platform": "cloud.platform",
"cloud.provider": "cloud.provider",
"cloud.availability": "cloud.availability",
"cloud.availability_zone": "cloud.availability_zone",
"cloud.region": "cloud.region",
"cloud.image.id": "cloud.image.id",
"cloud.image.name": "cloud.image.name",
"deployment.environment": "deployment.environment.name",
"deployment.environment.name": "deployment.environment.name",
"aws.ecs.cluster.arn": "aws.ecs.cluster.arn",
"aws.ecs.launchtype": "aws.ecs.launchtype",
"aws.ecs.task.arn": "aws.ecs.task.arn",
"aws.ecs.task.family": "aws.ecs.task.family",
"aws.ecs.task.id": "aws.ecs.task.id",
"aws.ecs.task.revision": "aws.ecs.task.revision",
"aws.log.group.arns": "aws.log.group.arns",
"aws.log.group.names": "aws.log.group.names",
"aws.log.stream.arns": "aws.log.stream.arns",
"aws.log.stream.names": "aws.log.stream.names",
"host.arch":"host.arch",
"host.cpu.name":"host.cpu.name",
"host.id": "host.id",
"host.image.id": "host.image.id",
"host.image.name":"host.image.name",
"host.name": "host.name",
"host.type": "host.type",
"azure.resourcegroup.name": "azure.resourcegroup.name",
"azure.vm.name": "azure.vm.name",
"azure.vm.scaleset.name": "azure.vm.scaleset.name",
"azure.vm.size": "azure.vm.size",
"service.namespace": "service.namespace",
"service.name":"service.name",
"service.version":"service.version",
"service.instance.id":"service.instance.id",
"team.name": "team.name",
"telemetry.sdk.language":"telemetry.sdk.language",
"telemetry.sdk.name":"telemetry.sdk.name",
"telemetry.sdk.version":"telemetry.sdk.version",
"http.method":"http.method",
"http.status_code":"http.status_code",
"http.url": "http.url",
"http.target": "http.target",
"http.host": "http.host",
"http.scheme": "http.scheme",
"http.route": "http.route",
"http.user_agent": "http.user_agent",
"net.peer.ip": "net.peer.ip",
"net.peer.port": "net.peer.port",
"net.host.name": "net.host.name",
"net.host.port": "net.host.port",
"network.protocol.name": "network.protocol.name",
"network.protocol.version": "network.protocol.version",
"db.system": "db.system",
"db.statement": "db.statement",
"db.name": "db.name",
"db.user": "db.user",
"db.operation": "db.operation",
"db.sql.table": "db.sql.table",
"db.connection_string": "db.connection_string",
"messaging.system": "messaging.system",
"messaging.destination": "messaging.destination",
"messaging.operation": "messaging.operation",
"rpc.system": "rpc.system",
"rpc.service": "rpc.service",
"rpc.method": "rpc.method"
}