Skip to content

Commit 853346d

Browse files
luckyj5Donald Tregonning
authored andcommitted
Merge v1.0.2 changes to master (#160)
* Adds a logger to catch errors bubbled up from annotating application metadata. * Update glide.lock * Removes unused hex ids to fix ginkgo typecheck failures from PR-146 * Tile update for PAS 2.4 (#157) * update stemcell to xenial and added memory as a config param * added logging to report error when unable to fetch copy of cache from remote
1 parent d692e57 commit 853346d

File tree

6 files changed

+29
-31
lines changed

6 files changed

+29
-31
lines changed

cache/boltdb.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ func (c *Boltdb) invalidateCache() {
284284
c.lock.Lock()
285285
c.cache = apps
286286
c.lock.Unlock()
287+
} else {
288+
c.config.Logger.Error("Unable to fetch copy of cache from remote", err)
287289
}
290+
288291
case <-c.closing:
289292
return
290293
}

events/events.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,12 @@ func (e *Event) AnnotateWithAppData(appCache cache.Cache) {
172172

173173
if cf_app_id != nil && appGuid != "<nil>" && cf_app_id != "" {
174174
appInfo, err := appCache.GetApp(appGuid)
175-
if err != nil || appInfo == nil {
175+
if err != nil {
176+
logrus.Error("Failed to fetch application metadata: ", err)
177+
return
178+
} else if appInfo == nil {
176179
return
177180
}
178-
179181
cf_app_name := appInfo.Name
180182
cf_space_id := appInfo.SpaceGuid
181183
cf_space_name := appInfo.SpaceName

eventsink/splunk_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ var _ = Describe("Splunk", func() {
118118
var envelopeHttpStartStop *events.HttpStartStop
119119
var startTimestamp, stopTimestamp int64
120120
var requestId events.UUID
121-
var requestIdHex, applicationIdHex string
122121
var peerType events.PeerType
123122
var method events.Method
124123
var uri, remoteAddress, userAgent string
@@ -149,15 +148,13 @@ var _ = Describe("Splunk", func() {
149148
Low: &requestIdLow,
150149
High: &requestIdHigh,
151150
}
152-
requestIdHex = "b12a3f87-83ab-4cf2-554b-042dc36e28f1"
153151

154152
applicationIdLow := uint64(10539615360601842564)
155153
applicationIdHigh := uint64(3160954123591206558)
156154
applicationId = events.UUID{
157155
Low: &applicationIdLow,
158156
High: &applicationIdHigh,
159157
}
160-
applicationIdHex = "8463ec45-543c-4492-9ec6-f52707f7dd2b"
161158

162159
envelopeHttpStartStop = &events.HttpStartStop{
163160
StartTimestamp: &startTimestamp,
@@ -646,4 +643,4 @@ var _ = Describe("Splunk", func() {
646643
Ω(err).ShouldNot(HaveOccurred())
647644
})
648645

649-
})
646+
})

glide.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tile/tile-history.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
history:
33
- 0.2.1
44
- 1.0.0
5-
version: 1.0.1
5+
- 1.0.1
6+
version: 1.0.2

tile/tile.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ apply_open_security_group: true # Apply open security group, default: fals
88
allow_paid_service_plans: true # Allow paid service plans, default: false
99

1010
stemcell_criteria:
11-
os: ubuntu-trusty
11+
os: ubuntu-xenial
1212
requires_cpi: false
13-
version: '3421'
13+
version: '97'
1414

1515
properties:
1616
- name: author
@@ -109,16 +109,6 @@ forms:
109109
label: Additional Fields
110110
description: A set of user defined key:value pairs that are added to all Splunk events that do not occur in the event payload. Expected format - key1:value1, key2:value2, key3:value3
111111
optional: true
112-
- name: add_app_info
113-
type: boolean
114-
default: false
115-
label: Add App Information
116-
description: Enriches raw data with application metadata, such as application name, space name, org name, etc.
117-
- name: enable_event_tracing
118-
type: boolean
119-
label: Enable Event Tracing
120-
default: false
121-
description: Enables data loss tracing.
122112
- name: hec_retries
123113
type: integer
124114
label: HEC Retries
@@ -159,6 +149,21 @@ forms:
159149
label: App Limits
160150
default: 0
161151
description: The number of apps for which metadata is gathered when refreshing the app metadata cache (order based on app creation date). Set to 0 to remove limit.
152+
- name: nozzle_memory
153+
type: string
154+
label: Nozzle Memory
155+
description: Nozzle memory in MB.
156+
default: 256M
157+
- name: add_app_info
158+
type: boolean
159+
default: false
160+
label: Add App Information
161+
description: Enriches raw data with application metadata, such as application name, space name, org name, etc.
162+
- name: enable_event_tracing
163+
type: boolean
164+
label: Enable Event Tracing
165+
default: false
166+
description: Enables data loss tracing.
162167
- name: ignore_missing_app
163168
type: boolean
164169
label: Ignore Missing App
@@ -170,7 +175,7 @@ packages:
170175
type: app
171176
label: Splunk-Firehose-Nozzle
172177
manifest:
173-
memory: 256M
178+
memory: (( .properties.nozzle_memory.value ))
174179
instances: (( .properties.scale_out_nozzle.value ))
175180
buildpack: binary_buildpack
176181
health-check-type: process
@@ -179,13 +184,3 @@ packages:
179184
command: ./splunk-firehose-nozzle
180185
env:
181186
GOPACKAGENAME: main
182-
183-
184-
185-
186-
187-
188-
189-
190-
191-

0 commit comments

Comments
 (0)