Semantic Conventions
OpenTelemetry semantic conventions used by Telegen.
Overview
Telegen follows OpenTelemetry Semantic Conventions for consistent attribute naming across traces, metrics, and logs.
Resource Attributes
Resource attributes describe the entity producing telemetry.
Service
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Service name |
|
|
string |
Service namespace |
|
|
string |
Service version |
|
|
string |
Instance ID |
|
Host
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Hostname |
|
|
string |
Host ID |
|
|
string |
Host type |
|
|
string |
Architecture |
|
|
string |
OS image name |
|
|
string |
OS image version |
|
Operating System
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
OS type |
|
|
string |
OS description |
|
|
string |
OS name |
|
|
string |
OS version |
|
Process
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
int |
Process ID |
|
|
string |
Executable name |
|
|
string |
Executable path |
|
|
string |
Command |
|
|
string |
Full command line |
|
|
string |
Process owner |
|
|
string |
Runtime |
|
|
string |
Runtime version |
|
Container
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Container name |
|
|
string |
Container ID |
|
|
string |
Container runtime |
|
|
string |
Image name |
|
|
string |
Image tag |
|
Kubernetes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Pod name |
|
|
string |
Pod UID |
|
|
string |
Namespace |
|
|
string |
Node name |
|
|
string |
Node UID |
|
|
string |
Deployment |
|
|
string |
ReplicaSet |
|
|
string |
StatefulSet |
|
|
string |
DaemonSet |
|
|
string |
Job |
|
|
string |
CronJob |
|
|
string |
Container name |
|
|
string |
Cluster name |
|
Cloud
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Cloud provider |
|
|
string |
Account ID |
|
|
string |
Region |
|
|
string |
AZ |
|
|
string |
Platform |
|
HTTP Span Attributes
Client Spans
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
HTTP method |
|
|
string |
Full URL |
|
|
string |
URL path |
|
|
string |
Query string |
|
|
string |
URL scheme |
|
|
string |
Server hostname |
|
|
int |
Server port |
|
|
int |
Status code |
|
|
string |
HTTP version |
|
|
string |
User agent |
|
Server Spans
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
HTTP method |
|
|
string |
URL path |
|
|
string |
Query string |
|
|
string |
URL scheme |
|
|
string |
Route template |
|
|
int |
Status code |
|
|
int |
Request body size |
|
|
int |
Response body size |
|
|
string |
Client IP |
|
|
int |
Client port |
|
gRPC Span Attributes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
RPC system |
|
|
string |
Service name |
|
|
string |
Method name |
|
|
int |
gRPC status |
|
|
string |
Request metadata |
|
|
string |
Response metadata |
Database Span Attributes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Database system |
|
|
string |
Connection string |
(redacted) |
|
string |
Database user |
|
|
string |
Database name |
|
|
string |
SQL statement |
|
|
string |
Operation |
|
|
string |
Table name |
|
|
string |
Server hostname |
|
|
int |
Server port |
|
Database System Values
Value |
Database |
|---|---|
|
PostgreSQL |
|
MySQL |
|
MongoDB |
|
Redis |
|
Elasticsearch |
|
Cassandra |
|
Microsoft SQL Server |
|
Oracle |
Messaging Span Attributes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Messaging system |
|
|
string |
Topic/queue |
|
|
string |
Destination kind |
|
|
string |
Operation |
|
|
string |
Message ID |
|
|
int |
Body size |
|
|
int |
Partition |
|
|
int |
Offset |
|
|
string |
Consumer group |
|
Network Attributes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Transport |
|
|
string |
Network type |
|
|
string |
Protocol |
|
|
string |
Protocol version |
|
|
string |
Peer address |
|
|
int |
Peer port |
|
|
string |
Local address |
|
|
int |
Local port |
|
Exception Attributes
Attribute |
Type |
Description |
Example |
|---|---|---|---|
|
string |
Exception type |
|
|
string |
Exception message |
|
|
string |
Stack trace |
(multiline) |
|
boolean |
Escaped scope |
|
Span Status
Status |
Code |
Description |
|---|---|---|
|
0 |
Default, not set |
|
1 |
Successful |
|
2 |
Error occurred |
Span Kind
Kind |
Description |
Example |
|---|---|---|
|
Internal operation |
Business logic |
|
Server-side request |
HTTP server handler |
|
Client-side request |
HTTP client call |
|
Message producer |
Kafka producer |
|
Message consumer |
Kafka consumer |
Metric Semantic Conventions
HTTP Metrics
Metric |
Type |
Unit |
Description |
|---|---|---|---|
|
Histogram |
s |
Server request duration |
|
UpDownCounter |
{request} |
Active requests |
|
Histogram |
By |
Request body size |
|
Histogram |
By |
Response body size |
|
Histogram |
s |
Client request duration |
RPC Metrics
Metric |
Type |
Unit |
Description |
|---|---|---|---|
|
Histogram |
ms |
Server call duration |
|
Histogram |
ms |
Client call duration |
Database Metrics
Metric |
Type |
Unit |
Description |
|---|---|---|---|
|
UpDownCounter |
{connection} |
Connections |
|
UpDownCounter |
{connection} |
Max connections |
Log Semantic Conventions
Severity Levels
Level |
Number |
Description |
|---|---|---|
TRACE |
1 |
Fine-grained debug |
DEBUG |
5 |
Debug information |
INFO |
9 |
Informational |
WARN |
13 |
Warning |
ERROR |
17 |
Error |
FATAL |
21 |
Fatal error |
Common Log Attributes
Attribute |
Type |
Description |
|---|---|---|
|
string |
Log file name |
|
string |
Log file path |
|
string |
stdout/stderr |
|
string |
Unique log ID |
Telegen-Specific Attributes
In addition to OTel conventions, Telegen adds:
Attribute |
Type |
Description |
|---|---|---|
|
string |
Telegen version |
|
string |
eBPF program name |
|
string |
Discovery source |
|
string |
Profile type |
Best Practices
Use standard conventions - Prefer OTel conventions over custom attributes
Add context - Include relevant resource attributes
Low cardinality - Avoid high-cardinality values in metric labels
Sensitive data - Don’t include PII or secrets in attributes
Consistent naming - Follow snake_case for custom attributes
Next Steps
Metrics Reference - Available metrics
Distributed Tracing - Tracing details