Skip to content

Commit

Permalink
Added example of an Event (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
scheler authored Jul 29, 2024
1 parent 484241a commit 9833c48
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The full list of changes can be found in the compare view for the respective rel
[#484](https://github.com/open-telemetry/opentelemetry-proto/pull/484)
* Add metric.metadata for supporting additional metadata on metrics
[#514](https://github.com/open-telemetry/opentelemetry-proto/pull/514)
* Add example of an Event [#538](https://github.com/open-telemetry/opentelemetry-proto/pull/538)

### Changed

Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ that can be used as request payloads.
- Trace [trace.json](trace.json)
- Metrics [metrics.json](metrics.json)
- Logs [logs.json](logs.json)
- Events [events.json](events.json)

## Trying it out

Expand Down
75 changes: 75 additions & 0 deletions examples/events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"resourceLogs": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "my.service"
}
}
]
},
"scopeLogs": [
{
"scope": {
"name": "my.library",
"version": "1.0.0",
"attributes": [
{
"key": "my.scope.attribute",
"value": {
"stringValue": "some scope attribute"
}
}
]
},
"logRecords": [
{
"timeUnixNano": "1544712660300000000",
"observedTimeUnixNano": "1544712660300000000",
"severityNumber": 9,
"attributes": [
{
"key": "event.name",
"value": {
"stringValue": "browser.page_view"
}
}
],
"body": {
"kvlistValue": [
{
"key": "type",
"value": {
"intValue": "0"
}
},
{
"key": "url",
"value": {
"stringValue": "https://www.guidgenerator.com/online-guid-generator.aspx"
}
},
{
"key": "referrer",
"value": {
"stringValue": "https://wwww.google.com"
}
},
{
"key": "title",
"value": {
"stringValue": "Free Online GUID Generator"
}
}
]
}
}
]
}
]
}
]
}

0 comments on commit 9833c48

Please sign in to comment.