Skip to content

Commit

Permalink
feat: remove error message attribute (#2207)
Browse files Browse the repository at this point in the history
Issue: #2194

Remove error messages from attribute logging to avoid leaking private
info into metrics
  • Loading branch information
deniseli authored Jul 30, 2024
1 parent 78f3a13 commit eaa09ea
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions backend/controller/observability/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const (
pubsubSinkRefAttr = "ftl.pubsub.sink.ref"
pubsubSinkModuleAttr = "ftl.pubsub.sink.module.name"
pubsubFailedOperationAttr = "ftl.pubsub.propagation.failed_operation"
pubsubFailedToPublishErrAttr = "ftl.pubsub.publish.error.message"
)

type PubSubMetrics struct {
Expand Down Expand Up @@ -83,10 +82,6 @@ func (m *PubSubMetrics) Published(ctx context.Context, module, topic string, may
attribute.Bool(observability.StatusSucceededAttribute, maybeErr == nil),
}

if maybeErr != nil {
attrs = append(attrs, attribute.String(pubsubFailedToPublishErrAttr, maybeErr.Error()))
}

m.published.Add(ctx, 1, metric.WithAttributes(attrs...))
}

Expand Down

0 comments on commit eaa09ea

Please sign in to comment.