# Log Data Model Notes Source: [Dynatrace Log Semantic Dictionary](https://docs.dynatrace.com/docs/semantic-dictionary/model/log) Extensions: [Dynatrace SD Fields](https://docs.dynatrace.com/docs/semantic-dictionary/fields) Baseline: `samples/audit-logs.json`, `samples/http-logs.json` ## TOC - [Core Fields](#core-fields) - [Audit Namespace](#audit-namespace) - [Actor and Client Fields](#actor-and-client-fields) - [Device and Browser Fields](#device-and-browser-fields) - [Result Fields](#result-fields) - [HTTP Namespace](#http-namespace) - [URL Namespace](#url-namespace) - [Server Namespace](#server-namespace) - [Geo Namespace](#geo-namespace) - [Cloud Context Fields](#cloud-context-fields) - [loglevel Enum](#loglevel-enum) - [status Enum](#status-enum) - [SD Extension Namespaces](#sd-extension-namespaces) - [Log Class Field Requirements](#log-class-field-requirements) - [Known Discrepancies and Bugs](#known-discrepancies-and-bugs) - [Sparse Mapping Policy](#sparse-mapping-policy) --- ## Core Fields | Field | Type | SD Status | Required | Notes | |---|---|---|---|---| | `timestamp` | timestamp | stable | yes | Auto-generated by Dynatrace on ingest — represents ingest time, NOT the vendor event time. Do not map from vendor payload. Vendor event time → `audit.time`. | | `content` | string | stable | yes | Raw vendor log as a JSON string. Auto-enriched by Dynatrace on ingest — do not map manually. MUST be string on final ingested events. | | `log.source` | string | stable | yes | Human-readable integration name as a constant (e.g. `"JFrog"`, `"Okta"`, `"CyberArk"`). NOT the raw vendor identifier from the payload. | | `loglevel` | string | stable | yes | See enum — MUST be normalized | | `status` | string | experimental | recommended | See enum — mirrors `loglevel` in practice | | `event.type` | string | stable | recommended | Always `"LOG"` for audit logs; often absent for HTTP logs | --- ## Audit Namespace Required for authentication, authorization, and user_action log classes. Not used for HTTP logs. | Field | Type | SD Status | Notes | |---|---|---|---| | `audit.action` | string | stable | What happened. Use vendor-native value. Examples: `"Multifactor challenge"`, `"Create okta group"`, `"export"` | | `audit.identity` | string | stable | Who did it — email or username. Required when identifiable. | | `audit.result` | string | stable | Outcome. Convention from samples: **`Succeeded`** / **`Failed`** (title case). SD does not define an enum. | | `audit.status` | string | stable | Lifecycle state of the audited action. SD enum: `Started`, `In Progress`, `Succeeded`, `Failed`, `Active`, `Resolved`. MUST NOT be set to a loglevel value (e.g. `"INFO"`) — that is a mapping error. | | `audit.time` | timestamp | experimental | When the action occurred if different from `timestamp`. MUST be ISO8601 with timezone. | --- ## Actor and Client Fields | Field | Type | SD Status | Notes | |---|---|---|---| | `actor.ips` | ipAddress[] | stable | Client IP(s) as array. Primary IP field for audit logs — populate when vendor provides any IP. | | `actor.geo.city.name` | string | experimental | Actor city — for audit logs where the actor is the subject | | `actor.geo.country.name` | string | experimental | Actor country name or 2-letter code | | `actor.geo.location.lat` | float | experimental | WGS84 latitude. Prefer float/number — string is accepted but degrades geo queries | | `actor.geo.location.lon` | float | experimental | WGS84 longitude | | `client.ip` | ipAddress | experimental | Single client IP. Consistently present alongside `actor.ips` in audit logs — acceptable duplication. | | `client.app.name` | string | experimental | Client application name (e.g. `"Confluence"`, `"Identity"`) | --- ## Device and Browser Fields | Field | Type | SD Status | Notes | |---|---|---|---| | `browser.name` | string | resource stable | Browser type (e.g. `"Chrome"`) | | `browser.version` | string | resource stable | Browser version | | `browser.user_agent` | string | — | Full raw user-agent string. Not in log SD but consistently observed in samples — acceptable extension. | | `device.id` | string | experimental | Device GUID | | `device.name` | string | experimental | Device display name | | `device.os.name` | string | experimental | OS name (e.g. `"Mac"`, `"Windows 10"`) | --- ## Result Fields | Field | Type | SD Status | Notes | |---|---|---|---| | `result.code` | **long** | experimental | SD type is `long`. String values observed in samples are **bugs** — coerce to numeric on ingest (e.g. `"50076"` → `50076`). Non-numeric vendor codes (e.g. `"IDP2013"`, `"SUCCESS"`) should use `result.message` instead. | | `result.message` | string | experimental | Brief outcome message | | `result.detail` | string | experimental | Detailed result information. SD field name is `result.detail` (singular). `result.details` (plural) observed in samples is a **bug** — use `result.detail`. | --- ## HTTP Namespace Used for HTTP/WAF log classes. Not used for audit logs. | Field | Type | Notes | |---|---|---| | `http.request.method` | string | HTTP verb (`"GET"`, `"POST"`, `"PUT"`, `"DELETE"`, etc.) | | `http.response.status_code` | integer | HTTP status code — MUST be integer. String values (e.g. `"204"`) are bugs; coerce to int. | | `http.response.body.size` | long | Response body size in bytes | | `http.request.header.` | string | Individual request headers — header name MUST be lowercase (e.g. `http.request.header.user-agent`, `http.request.header.content-type`) | | `http.response.header.` | string | Individual response headers — header name MUST be lowercase (e.g. `http.response.header.content-type`) | --- ## URL Namespace Used for HTTP log classes. | Field | Type | Notes | |---|---|---| | `url.domain` | string | Hostname / domain (e.g. `"api.sampledomain.com"`) | | `url.path` | string | Request path (e.g. `"/api/v1/groups"`) | | `url.port` | string / integer | Port number. Prefer integer. | | `url.scheme` | string | Protocol (e.g. `"https"`, `"HTTP/1.1"`) | --- ## Server Namespace Used for HTTP log classes where the request target is a named server. | Field | Type | Notes | |---|---|---| | `server.address` | string | Target server hostname or FQDN | --- ## Geo Namespace `geo.*` fields can appear at root level or nested under another SD namespace to clarify whose location is being described. Choose the placement based on the subject: | Namespace | Use for | Fields | |---|---|---| | `geo.*` | Geo-location of the network request or event origin (IP-derived). Root-level. Use for HTTP/WAF logs and any log where the IP source location is the primary geo signal. | `geo.city.name`, `geo.continent.name`, `geo.country.name`, `geo.region.code` | | `actor.geo.*` | Geo-location of the actor (person/service performing the action). Nested under `actor.*`. Use in audit logs when the vendor separately reports actor location. | `actor.geo.city.name`, `actor.geo.country.name`, `actor.geo.location.lat`, `actor.geo.location.lon` | Do not mix both namespaces in the same event unless the vendor separately reports network origin geo and actor geo. --- ## Cloud Context Fields | Field | Type | Notes | |---|---|---| | `cloud.provider` | string | `"aws"`, `"azure"`, `"gcp"` | | `azure.tenant.id` | string | Azure tenant GUID | | `azure.tenant.name` | string | Azure tenant display name | | `aws.account.id` | string | AWS account number | --- ## loglevel Enum MUST be one of: `ERROR`, `WARN`, `INFO`, `DEBUG`, `TRACE`, `NONE` Derivation guidance: | Condition | loglevel | |---|---| | HTTP 5xx | `ERROR` | | HTTP 4xx | `WARN` | | HTTP 2xx/3xx | `INFO` | | `audit.result = "Failed"` (auth/access failure) | `ERROR` | | `audit.result = "Failed"` (non-critical action) | `WARN` | | `audit.result = "Succeeded"` | `INFO` | | No severity signal available | `NONE` | --- ## status Enum MUST be one of: `INFO`, `WARN`, `ERROR`, `NONE` In all samples, `status` mirrors `loglevel`. Use the same derivation logic. --- ## SD Extension Namespaces Log records can carry fields from any SD-documented namespace as extensions. The most common for audit and HTTP logs: | Namespace | Use case | Representative fields | |---|---|---| | `product.*` | Product/vendor identity | `product.name`, `product.vendor` | | `object.*` | Target resource in an audit action | `object.id`, `object.name`, `object.type` | | `browser.*` | Browser context | `browser.name`, `browser.version`, `browser.user_agent` | | `http.*` | HTTP request/response | `http.request.method`, `http.response.status_code`, `http.request.header.*` | | `url.*` | URL decomposition | `url.domain`, `url.path`, `url.port`, `url.scheme` | | `server.*` | Request target server | `server.address` | | `geo.*` | Network geo-location (HTTP logs) | `geo.city.name`, `geo.country.name`, `geo.continent.name` | | `host.*` | Log-shipping host | `host.name`, `host.hostname`, `host.fqdn`, `host.id` | | `db.*` | Database operations | `db.system`, `db.query.text` | | `code.*` | Source code context | `code.function`, `code.filepath` | | `network.*` | Network layer | `network.protocol`, `network.transport` | | `device.*` | Client device | `device.id`, `device.name`, `device.os.name` | | `user.*` | User identity (where `audit.identity` is insufficient) | `user.id`, `user.name`, `user.email` | Less commonly used: `app.*`, `aws.*`, `azure.*`, `gcp.*`, `cicd.*`, `container.*`, `k8s.*` All SD-documented namespace fields are acceptable — they are not vendor extensions and do not need to pass the duplication check. Vendor-specific namespaces (`akamai.*`, `cyberark.*`, `okta.*`) follow the separate vendor namespace duplication rule. Full field list: https://docs.dynatrace.com/docs/semantic-dictionary/fields --- ## Log Class Field Requirements | Class | Required semantic fields | Typical namespaces | |---|---|---| | `authentication` | `audit.action`, `audit.identity`, `audit.result`, `actor.ips` | `audit.*`, `actor.*`, `browser.*`, `device.*`, `cloud.*` | | `authorization` | `audit.action`, `audit.identity`, `audit.result` | `audit.*`, `actor.*`, `object.*` | | `user_action` | `audit.action`, `audit.identity`, `audit.result` | `audit.*`, `actor.*`, `object.*`, `product.*` | | `http` | `http.request.method`, `http.response.status_code`, `url.path` | `http.*`, `url.*`, `server.*`, `geo.*`, `client.*` | Minimum always-required (all classes): `timestamp`, `log.source`, `content`, `loglevel` --- ## Known Discrepancies and Bugs Fields that diverge from the SD. Bugs are mapping errors to fix; accepted deviations are expected patterns. | Field | SD Definition | Observed | Verdict | |---|---|---|---| | `result.code` string values | `long` | `"IDP2013"`, `"SUCCESS"`, `"50076"` in audit-logs.json | **Bug** — non-numeric codes belong in `result.message`; numeric codes must be coerced to `long` | | `result.details` (plural) | `result.detail` (singular) | `result.details` in audit-logs.json | **Bug** — use `result.detail` | | `audit.status = "INFO"` | `Started/In Progress/Succeeded/Failed/Active/Resolved` | CyberArk sample | **Bug** — `"INFO"` is a loglevel value, not an audit status | | `http.response.status_code` as string | integer | `"204"` in http-logs.json | **Bug** — coerce to integer | | `http.response.body.size` as string | long | `"0"` in http-logs.json | **Bug** — coerce to long | | `client.ip` alongside `actor.ips` | — | All audit-log samples | Accepted — minor redundancy, do not flag as error | | `actor.geo.location.lat/lon` as string | float | audit-logs.json mixed types | Minor — prefer float; accept string | | `audit.time` missing timezone | ISO8601 with timezone | GitHub sample | Minor — flag, append `Z` | | `event.type = "LOG"` | SD optional | audit-log samples | Accepted — consistent convention | | `product.name`, `product.vendor` | Absent from log SD | CyberArk, Okta | Accepted SD extension | | `object.id/name/type` | Absent from log SD | Okta, Azure, CyberArk | Accepted SD extension | | `browser.user_agent` | Absent from log SD | CyberArk, Okta | Accepted SD extension | | `host.name/id/hostname` | Absent from log SD | log-shipping metadata | Accepted — standard ECS/OTel host fields | | `authentication.*` | Absent from log SD | CyberArk, Azure | Accepted vendor extension | | `loglevel: "INFO"` / `status: "INFO"` for HTTP 204 | HTTP 2xx → `INFO` | Akamai SIEM sample | Aligned — derived from HTTP status code per enum table | | `url.scheme: "https"` | Protocol scheme (e.g. `"https"`) | Akamai SIEM sample | Aligned — normalized to scheme component only | | `url.port` as integer | integer preferred | Akamai SIEM sample | Aligned — normalized numeric port | --- ## Sparse Mapping Policy Not every field is required for every integration. **Minimum required (all classes):** `timestamp`, `log.source`, `content`, `loglevel`, `audit.action`, `audit.identity` *(HTTP class: replace `audit.action`/`audit.identity` with `http.request.method`, `http.response.status_code`, `url.path`)* A sparse mapping covering the minimum is `medium` confidence. Add recommended fields to reach `high`.