Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4746fbb
introduce: log.type
hilmarf Feb 9, 2026
eb33c75
Merge branch 'open-telemetry:main' into log.type
hilmarf Feb 9, 2026
3282426
GHA sync-fork
hilmarf Feb 9, 2026
69efcef
Merge branch 'open-telemetry:main' into main
hilmarf Feb 9, 2026
c708f79
Merge branch 'main' into log.type
hilmarf Feb 9, 2026
c3038a4
make fix
hilmarf Feb 9, 2026
b02397f
Merge remote-tracking branch 'refs/remotes/origin/log.type' into log.…
hilmarf Feb 9, 2026
3d51e4e
add chloggen
hilmarf Feb 9, 2026
fe80a38
Merge branch 'open-telemetry:main' into main
hilmarf Feb 10, 2026
a0df21d
Merge branch 'open-telemetry:main' into main
hilmarf Feb 12, 2026
c130171
Merge branch 'open-telemetry:main' into main
hilmarf Feb 12, 2026
28568f7
Merge branch 'main' into log.type
hilmarf Feb 12, 2026
6499d7d
Merge branch 'open-telemetry:main' into main
hilmarf Feb 17, 2026
79a81fa
Merge branch 'open-telemetry:main' into main
hilmarf Feb 19, 2026
fa0dfe1
Merge branch 'open-telemetry:main' into main
hilmarf Feb 20, 2026
2b03aa6
Merge branch 'main' into log.type
hilmarf Feb 23, 2026
24346f0
link issue 3429
hilmarf Feb 23, 2026
6632a14
remove sync-fork
hilmarf Feb 23, 2026
7048d20
Merge branch 'open-telemetry:main' into main
hilmarf Feb 24, 2026
be169f0
Merge branch 'open-telemetry:main' into main
hilmarf Mar 3, 2026
1d33d34
Merge branch 'main' into log.type
hilmarf Mar 3, 2026
302ba26
using 'SHOULD' instead of 'MUST'
hilmarf Mar 3, 2026
6655632
Merge branch 'open-telemetry:main' into log.type
hilmarf Mar 23, 2026
a21475b
Merge branch 'open-telemetry:main' into log.type
hilmarf Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/log.type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: log

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Introduce `log.type` attribute to classify log entries by type."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [ 3429 ]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
16 changes: 16 additions & 0 deletions .github/workflows/sync-fork.yaml
Comment thread
kamphaus marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: sync-fork
on:
schedule:
- cron: '4 2 * * 4,2'
workflow_dispatch:
jobs:
sync-fork:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- run: gh repo sync $REPOSITORY -b $BRANCH_NAME
env:
GITHUB_TOKEN: ${{ secrets.SYNC_FORK_TOKEN }}
REPOSITORY: ${{ github.repository }}
BRANCH_NAME: ${{ github.ref_name }}
10 changes: 10 additions & 0 deletions docs/general/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,22 @@ These attributes may be used for identifying a Log Record.
| --- | --- | --- | --- | --- | --- |
| [`log.record.original`](/docs/registry/attributes/log.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The complete original Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` |
| [`log.record.uid`](/docs/registry/attributes/log.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` |
| [`log.type`](/docs/registry/attributes/log.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The type or category of the log record. See below for a list of well-known values. | `audit`; `app` |

**[1] `log.record.original`:** This value MAY be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.)

**[2] `log.record.uid`:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values.
The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed.

---

`log.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| --- | --- | --- |
| `app` | Default regular application log - everything which is NOT audit relevant | ![Development](https://img.shields.io/badge/-development-blue) |
| `audit` | Audit log recording security-relevant activities for compliance and forensics. When log.type='audit', the log record MUST not get lost and body not changed. | ![Development](https://img.shields.io/badge/-development-blue) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a prototype of this in practice?

I'm nervous that since this is so low in the hierarchy, otel will naturally batch data by resource/scope and that means audit logs and regular logs are all mixed together.

Should we try to make sure we batch/send this data in a separate channel or some how do not automatically bundle app + audit logs in the same channel?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a prototype of this in practice?

Not yet. If you could point me to an example of what you would expect, I can try to create a prototype accordingly.

I'm nervous that since this is so low in the hierarchy, otel will naturally batch data by resource/scope and that means audit logs and regular logs are all mixed together.

Yes, unfortunately that’s correct.

Should we try to make sure we batch/send this data in a separate channel or some how do not automatically bundle app + audit logs in the same channel?

That would actually be great! My impression so far, however, is that introducing a new channel might be considered a rather large request and likely won't get accepted by the OTel code owners. Their last responses were along the lines of: "We have no time/interest to work on audit logging and are currently focusing solely on stabilization."

Given that audit logging is not currently on the roadmap, I'm investigating other mechanisms to clearly differentiate between non-essential and security-relevant log messages.

@kamphaus kamphaus Mar 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the log record MUST not get lost and body not changed

How would we enforce this? Should this be a spec change?
If you wanted to enforce this, it would have many consequences for the otel-collector and observability backends.
In my opinion the wording should use SHOULD. The audit data would be sent via the same channels as regular data and be a hint for later stages in the observability pipeline. You could then add routing / conditional processing to direct these logs to a separate destination.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the log record MUST not get lost and body not changed

How would we enforce this? Should this be a spec change? If you wanted to enforce this, it would have many consequences for the otel-collector and observability backends. In my opinion the wording should use SHOULD. The audit data would be sent via the same channels as regular data and be a hint for later stages in the observability pipeline. You could then add routing / conditional processing to direct these logs to a separate destination.

I've updated the wording as you suggested.

Nevertheless, the intention is indeed to implement some of the consequences you have in mind within the otel-collector itself — potentially as a dedicated audit-processor or a specialized exporter.

We're also evaluating whether we can add certain integrity‑validation mechanisms, so that audit logs can be verified downstream without requiring the collector to enforce immutability strictly.


<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
Expand Down
10 changes: 10 additions & 0 deletions docs/registry/attributes/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This document defines log attributes
| Key | Stability | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- |
| <a id="log-iostream" href="#log-iostream">`log.iostream`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The stream associated with the log. See below for a list of well-known values. | `stdout`; `stderr` |
| <a id="log-type" href="#log-type">`log.type`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The type or category of the log record. See below for a list of well-known values. | `audit`; `app` |

---

Expand All @@ -26,6 +27,15 @@ This document defines log attributes
| `stderr` | Events from stderr stream | ![Development](https://img.shields.io/badge/-development-blue) |
| `stdout` | Logs from stdout stream | ![Development](https://img.shields.io/badge/-development-blue) |

---

`log.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| --- | --- | --- |
| `app` | Default regular application log - everything which is NOT audit relevant | ![Development](https://img.shields.io/badge/-development-blue) |
| `audit` | Audit log recording security-relevant activities for compliance and forensics. When log.type='audit', the log record MUST not get lost and body not changed. | ![Development](https://img.shields.io/badge/-development-blue) |

## Log File Attributes

Attributes for a file to which log was emitted.
Expand Down
2 changes: 2 additions & 0 deletions model/log/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ groups:
brief: >
The attributes described in this section are rather generic. They may be used in any Log Record they apply to.
attributes:
- ref: log.type
requirement_level: opt_in
- ref: log.record.uid
requirement_level: opt_in
- ref: log.record.original
Expand Down
16 changes: 16 additions & 0 deletions model/log/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ groups:
brief: >
This document defines log attributes
attributes:
- id: log.type
stability: development
brief: >
The type or category of the log record. See below for a list of well-known values.
type:
members:
- id: audit
value: 'audit'
brief: >
Audit log recording security-relevant activities for compliance and forensics. When log.type='audit', the log record MUST not get lost and body not changed.
stability: development
- id: application
value: 'app'
brief: 'Default regular application log - everything which is NOT audit relevant'
stability: development

- id: log.iostream
stability: development
brief: >
Expand Down