diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b0e4589..12b13a27f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/examples/README.md b/examples/README.md index 2c689431b..c3344bbce 100644 --- a/examples/README.md +++ b/examples/README.md @@ -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 diff --git a/examples/events.json b/examples/events.json new file mode 100644 index 000000000..57abd14ce --- /dev/null +++ b/examples/events.json @@ -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" + } + } + ] + } + } + ] + } + ] + } + ] + }