Skip to content

Commit c6a78b4

Browse files
author
Joseph Sirianni
authored
Azure feedback (#297)
* rename event_data --> message per observiq platform feedback * update docs to reflect final field names and promotions * add changelog for 0.13.20 and 0.13.21 * tag v0.13.21
1 parent 5fb66f5 commit c6a78b4

File tree

6 files changed

+39
-33
lines changed

6 files changed

+39
-33
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## Unreleased
7+
## [0.13.21] - 2021-05-07
8+
9+
### Changed
10+
- Renamed Azure Event Hub event_data field to message [PR297](https://github.com/observIQ/stanza/pull/297)
11+
12+
## [0.13.20] - 2021-05-06
813

914
### Added
1015
- Added flatten Operator [PR 286](https://github.com/observIQ/stanza/pull/286)

cmd/stanza/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.14
44

55
require (
66
github.com/kardianos/service v1.2.0
7-
github.com/observiq/stanza v0.13.20
7+
github.com/observiq/stanza v0.13.21
88
github.com/observiq/stanza/operator/builtin/input/k8sevent v0.1.0
99
github.com/observiq/stanza/operator/builtin/input/windows v0.1.1
1010
github.com/observiq/stanza/operator/builtin/output/elastic v0.1.0

docs/operators/azure_event_hub_input.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@ A list of potential keys and their purpose can be found [here](https://github.co
4040
{
4141
"timestamp": "2021-04-19T18:44:34.619Z",
4242
"severity": 0,
43+
"resource": {
44+
"event_id": "fea3c182-00a6-4951-8f6f-9331031f978f"
45+
},
4346
"record": {
44-
"event_data": "hello, world!",
45-
"id": "28447813-ebac-4908-9bd4-c1a79f9f98ad",
47+
"message": "hello, world!",
4648
"system_properties": {
4749
"x-opt-enqueued-time": "2021-04-19T18:44:34.619Z",
4850
"x-opt-offset": 6120,
4951
"x-opt-sequence-number": 51
5052
}
5153
}
5254
}
53-
```
55+
```

docs/operators/azure_log_analytics_input.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The `azure_log_analytics_input` operator reads Azure Log Analytics logs from Azure Event Hub using.
44

5-
The `azure_log_analytics_input` operator will use the `timegenerated` field as the parsed entry's timestamp. The label `azure_log_analytics_type` is derived from the log's `type` field. All other fields are added to the entry's record.
5+
The `azure_log_analytics_input` operator will use the `timegenerated` field as the parsed entry's timestamp. The label `azure_log_analytics_table` is derived from the log's `type` field.
66

77
## Prerequisites
88

@@ -42,28 +42,27 @@ A list of potential fields for each Azure Log Analytics table can be found [here
4242
4343
```json
4444
{
45-
"timestamp": "2021-04-26T18:19:31.358Z",
45+
"timestamp": "2021-05-07T14:01:26.105Z",
4646
"severity": 0,
47-
"labels": {
48-
"azure_log_analytics_type": "ContainerLog",
49-
},
5047
"record": {
51-
"_internal_workspaceresourceid": "/subscriptions/09373b6b-bc8b-4093-925d-eb87334c7d56/resourcegroups/bindplane-integration/providers/microsoft.operationalinsights/workspaces/bp-integration1",
52-
"_resourceid": "/subscriptions/09373b6b-bc8b-4093-925d-eb87334c7d56/resourceGroups/devops/providers/Microsoft.ContainerService/managedClusters/log-analytics",
53-
"computer": "aks-agentpool-39365618-vmss000001",
54-
"containerid": "93f4537223ae81d1c39e12e684de25c65207549d1003d153356055a6137f82b0",
55-
"logentry": "[SpanData(name='Recv.grpc.health.v1.Health.Check', context=SpanContext(trace_id=9d186b35325a4a9093242435948ada22, span_id=None, trace_options=TraceOptions(enabled=True), tracestate=None), span_id='bc4877b54bc8407b', parent_span_id=None, attributes={'component': 'grpc'}, start_time='2021-04-26T18:19:31.358155Z', end_time='2021-04-26T18:19:31.358229Z', child_span_count=0, stack_trace=None, time_events=[<opencensus.trace.time_event.TimeEvent object at 0x7f5d9fc53190>, <opencensus.trace.time_event.TimeEvent object at 0x7f5d9fc537d0>], links=[], status=None, same_process_as_parent_span=None, span_kind=1)]",
56-
"logentrysource": "stdout",
57-
"mg": "00000000-0000-0000-0000-000000000002",
58-
"sourcesystem": "Containers",
59-
"system_properties": {
60-
"x-opt-enqueued-time": "2021-04-26T18:19:50.361Z",
61-
"x-opt-offset": 14480072,
62-
"x-opt-sequence-number": 1548
48+
"containerlog": {
49+
"_internal_workspaceresourceid": "/subscriptions/000-000/resourcegroups/integration/providers/microsoft.operationalinsights/workspaces/stanza",
50+
"_resourceid": "/subscriptions/0000-000/resourceGroups/devops/providers/Microsoft.ContainerService/managedClusters/log-analytics",
51+
"computer": "aks-agentpool-39365618-vmss000001",
52+
"containerid": "f5376c6972ac19630113736e7d3bf359fe67065fde3831b0502cfee33470e68f",
53+
"logentry": "request to api failed"
54+
"logentrysource": "stdout",
55+
"mg": "00000000-0000-0000-0000-000000000002",
56+
"sourcesystem": "Containers",
57+
"tenantid": "ae0db88b-40bb-40b7-b056-57980214436c",
58+
"timegenerated": "2021-05-07T14:01:26.1050000Z",
59+
"timeofcommand": "2021-05-07T14:01:29.0000000Z"
6360
},
64-
"tenantid": "ae0db88b-40bb-40b7-b056-57980214436c",
65-
"timegenerated": "2021-04-26T18:19:31.3580000Z",
66-
"timeofcommand": "2021-04-26T18:19:44.0000000Z"
61+
"system_properties": {
62+
"x-opt-enqueued-time": "2021-05-07T14:01:37.789Z",
63+
"x-opt-offset": 150347296000,
64+
"x-opt-sequence-number": 125576
65+
}
6766
}
6867
}
69-
```
68+
```

operator/builtin/input/azure/event_hub_parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func parse(event azhub.Event, e *entry.Entry) error {
2020
m := make(map[string]interface{})
2121

2222
if len(event.Data) != 0 {
23-
m["event_data"] = string(event.Data)
23+
m["message"] = string(event.Data)
2424
}
2525

2626
if event.PartitionKey != nil {

operator/builtin/input/azure/event_hub_parse_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestParseEvent(t *testing.T) {
3838
&entry.Entry{
3939
Timestamp: testTime,
4040
Record: map[string]interface{}{
41-
"event_data": "event hub entry",
41+
"message": "event hub entry",
4242
"system_properties": map[string]interface{}{
4343
"x-opt-sequence-number": &testSequenceNum,
4444
"x-opt-enqueued-time": &testTime,
@@ -77,7 +77,7 @@ func TestParseEvent(t *testing.T) {
7777
&entry.Entry{
7878
Timestamp: testTime,
7979
Record: map[string]interface{}{
80-
"event_data": "hello world",
80+
"message": "hello world",
8181
"partition_key": &testPartitionKey,
8282
"properties": map[string]interface{}{
8383
"user": "stanza",
@@ -135,7 +135,7 @@ func TestPromoteTime(t *testing.T) {
135135
&entry.Entry{
136136
Timestamp: enqueuedTime,
137137
Record: map[string]interface{}{
138-
"event_data": "event hub entry",
138+
"message": "event hub entry",
139139
"system_properties": map[string]interface{}{
140140
"x-opt-enqueued-time": &enqueuedTime,
141141
},
@@ -157,7 +157,7 @@ func TestPromoteTime(t *testing.T) {
157157
&entry.Entry{
158158
Timestamp: ioTHubEnqueuedTime,
159159
Record: map[string]interface{}{
160-
"event_data": "event hub entry",
160+
"message": "event hub entry",
161161
"system_properties": map[string]interface{}{
162162
"iothub-enqueuedtime": &ioTHubEnqueuedTime,
163163
},
@@ -180,7 +180,7 @@ func TestPromoteTime(t *testing.T) {
180180
&entry.Entry{
181181
Timestamp: enqueuedTime,
182182
Record: map[string]interface{}{
183-
"event_data": "event hub entry",
183+
"message": "event hub entry",
184184
"system_properties": map[string]interface{}{
185185
"x-opt-enqueued-time": &enqueuedTime,
186186
"iothub-enqueuedtime": &ioTHubEnqueuedTime,
@@ -204,7 +204,7 @@ func TestPromoteTime(t *testing.T) {
204204
&entry.Entry{
205205
Timestamp: ioTHubEnqueuedTime,
206206
Record: map[string]interface{}{
207-
"event_data": "event hub entry",
207+
"message": "event hub entry",
208208
"system_properties": map[string]interface{}{
209209
"x-opt-enqueued-time": &time.Time{},
210210
"iothub-enqueuedtime": &ioTHubEnqueuedTime,

0 commit comments

Comments
 (0)