Skip to content

Commit

Permalink
STAC-21255: include attributes processor
Browse files Browse the repository at this point in the history
  • Loading branch information
fvlankvelt committed May 10, 2024
1 parent ce51add commit ba6fb3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion connector/stsservicegraphconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestUpdateDurationMetrics(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.caseStr, func(_ *testing.T) {
p.updateDurationMetrics(metricKey, tc.duration, tc.duration)
p.updateDurationMetrics(metricKey, tc.duration, tc.duration, 1)
})
}
}
Expand Down
6 changes: 3 additions & 3 deletions connector/stsservicegraphconnector/internal/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ func (s *Store) tryEvictHead() bool {
delete(s.m, headEdge.Key)
s.l.Remove(head)
} else {
// TODO: update weight of edge to compensate for expiration
// this keeps the metrics (in expectation) correct
headEdge.expiration = headEdge.expiration.Add(s.ttl)
headEdge.expiration = time.Now().Add(s.ttl)
headEdge.generation++
// update weight of edge to compensate for expiration
// this keeps the metrics (in expectation) correct
headEdge.logp += math.Log(1.0 - float64(s.l.Len()-1)/float64(s.maxItems))
s.l.MoveToBack(head)
}
Expand Down
1 change: 1 addition & 0 deletions sts-otel-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extensions:
processors:
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.99.0
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.99.0

Expand Down

0 comments on commit ba6fb3f

Please sign in to comment.