Skip to content

Commit

Permalink
Change mapping for log_name of Google Cloud Logging
Browse files Browse the repository at this point in the history
Fixes #1808

The log_name should not map to Name, they are not the same thing.

log_name description: The resource name of the log to which this log entry belongs.
(See https://cloud.google.com/logging/docs/reference/v2/rpc/google.logging.v2#logentry)

Name description: Short event identifier that does not contain varying parts.

log_name is now mapped to a Google-specific attribute. If better mapping is known
I can change to that but I don't see anything else in log data model log_name maps
nicely to.
  • Loading branch information
tigrannajaryan committed Dec 10, 2021
1 parent 283b317 commit a2355b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ release.

- Add OTEL_LOGS_EXPORTER environment variable.
([#2196](https://github.com/open-telemetry/opentelemetry-specification/pull/2196))
- Change mapping for log_name of Google Cloud Logging.
([#2092](https://github.com/open-telemetry/opentelemetry-specification/pull/2092))

### Resource

Expand Down
2 changes: 1 addition & 1 deletion specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ Field | Type | Description
-----------------|--------------------| ------------------------------------------------------- | ---------------------------
timestamp | string | The time the event described by the log entry occurred. | Timestamp
resource | MonitoredResource | The monitored resource that produced this log entry. | Resource
log_name | string | The URL-encoded LOG_ID suffix of the log_name field identifies which log stream this entry belongs to. | Name
log_name | string | The URL-encoded LOG_ID suffix of the log_name field identifies which log stream this entry belongs to. | Attributes["com.google.log_name"]
json_payload | google.protobuf.Struct | The log entry payload, represented as a structure that is expressed as a JSON object. | Body
proto_payload | google.protobuf.Any | The log entry payload, represented as a protocol buffer. | Body
text_payload | string | The log entry payload, represented as a Unicode string (UTF-8). | Body
Expand Down

0 comments on commit a2355b3

Please sign in to comment.