Skip to content

draft version of user emitted wf metrics#1924

Draft
karen-stepanyan wants to merge 1 commit intomainfrom
DF-23780
Draft

draft version of user emitted wf metrics#1924
karen-stepanyan wants to merge 1 commit intomainfrom
DF-23780

Conversation

@karen-stepanyan
Copy link

@github-actions
Copy link

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (1)

pkg/workflows/wasm/host.ExecutionHelper (1)
  • EmitUserMetric — ➕ Added

✅ Compatible Changes (14)

pkg/settings/cresettings.Workflows (5)
  • MetricEnabled — ➕ Added

  • MetricLabelsPerMetric — ➕ Added

  • MetricLabelValueLength — ➕ Added

  • MetricNameLengthLimit — ➕ Added

  • MetricPayloadLimit — ➕ Added

pkg/workflows/wasm/host.ModuleConfig (9)
  • EnableUserMetrics — ➕ Added

  • MaxLabelsPerMetric — ➕ Added

  • MaxLabelsPerMetricLimiter — ➕ Added

  • MaxLabelValueLength — ➕ Added

  • MaxLabelValueLengthLimiter — ➕ Added

  • MaxMetricNameLength — ➕ Added

  • MaxMetricNameLengthLimiter — ➕ Added

  • MaxMetricPayloadBytes — ➕ Added

  • MaxMetricPayloadLimiter — ➕ Added


📄 View full apidiff report

LogLineLimit Setting[config.Size]
LogEventLimit Setting[int] `unit:"{log}"`

MetricEnabled Setting[bool]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


if err := e.module.cfg.MaxMetricPayloadLimiter.Check(e.ctx, config.Size(ptrlen)); err != nil {
e.module.cfg.Logger.Warnf("metric payload too large: %d bytes - dropping: %s", ptrlen, err)
return -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we return a better error code? cc @nolag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants