Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Scope
Commits
f9e37a21
Commit
f9e37a21
authored
7 years ago
by
Jonathan Lange
Browse files
Options
Download
Email Patches
Plain Diff
Continue processing reports if billing fails
parent
2da9ec08
master
3810-cordon-control
Remove-stale-external-collaborators
add-weave-cloud
aliyun-sls-master
better-nat
bia-layout-prototype
bump-alpine
check-blank-id
consul-cleanup
container-netns
count-real-hosts
cri-container-state
delete-data
dependabot/go_modules/github.com/weaveworks/weave-2.6.3incompatible
docker-os
dont-stream-children
feature/read-password-from-file
feature/read-password-from-file-faq
fewer-closed-connections
filter-pseudo-pseudo-adjacencies
fix-build
fix-process-containername
fix-show-in
gh-pages
go-1-17-8
golangci-lint
hier-s3-key
less-quay
limit-parallel-decoding
lower-sirupsen-clean-approach-with-gvt
map-container-to-pod-ip
more-renderers-b
no-hex-hostnames
no-latest-timestamp
node-unsafe-merge
pod-name-promql
popup-terminal-delete-pipe
release-1.11
release-1.7
release-1.8
release-1.9
remove-endpoint-benchmark
remove-proxima
s390x-support
scan-data
scope_s390x
sets-sorted-slice
simplify-load-report
sliced-maps2
streamline-withparents
test-marshall-backwards
unsafe-merge-nodes
update-aws-sdk
update-common-lower-sirupsen
update-lodash
update-node-deps
update-opentracing
update-ugorji
wheel-event
wip-aws-timestamp
wip-child-ids
wip-drop-map-image
wip-render-docs
wip-simplify-connection-join
withlatests-slice
1.13.0
v1.13.2
v1.13.1
v1.12.0
v1.11.6
v1.11.5
v1.11.4
v1.11.3
v1.11.2
v1.11.1
v1.11.0
v1.10.2
v1.10.1
v1.10.0
v1.9.1
v1.9.0
v1.8.1
v1.8.0
v1.7.3
v1.7.2
v1.7.1
v1.7.0
v1.6.7
v1.6.6
latest_release
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/multitenant/billing_emitter.go
+6
-1
app/multitenant/billing_emitter.go
with
6 additions
and
1 deletion
+6
-1
app/multitenant/billing_emitter.go
+
6
-
1
View file @
f9e37a21
...
...
@@ -49,6 +49,9 @@ func (e *BillingEmitter) Add(ctx context.Context, rep report.Report, buf []byte)
now
:=
time
.
Now
()
.
UTC
()
userID
,
err
:=
e
.
UserIDer
(
ctx
)
if
err
!=
nil
{
// Underlying collector needs to get userID too, so it's OK to abort
// here. If this fails, so will underlying collector so no point
// proceeding.
return
err
}
rowKey
,
colKey
:=
calculateDynamoKeys
(
userID
,
now
)
...
...
@@ -80,8 +83,10 @@ func (e *BillingEmitter) Add(ctx context.Context, rep report.Report, buf []byte)
metadata
,
)
if
err
!=
nil
{
// No return, because we want to proceed even if we fail to emit
// billing data, so that defects in the billing system don't break
// report collection. Just log the fact & carry on.
log
.
Errorf
(
"Failed emitting billing data: %v"
,
err
)
return
err
}
return
e
.
Collector
.
Add
(
ctx
,
rep
,
buf
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help