Skip to content

Starlark Processor: Return multiple metrics from plugin #8371

@sjwang90

Description

@sjwang90

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Return multiple metrics from Starlark processor plugin

Current behavior:

Currently can only return (create) one metric from the Starlark

Desired behavior:

  • Return multiple metrics.
  • Approaches:
    1. Add a new function add() to add new metrics in the starlark processor. Use case: parse an array of json items and add one metric per item in the array
    2. Return an array or a tuple in the apply function. Currently we return the metric if we want to keep it. If we want to make multiple metrics from one, more natural to return multiple metrics rather than call an add() function

Use case:

  • Parse an array of json items and add one metric per item in the array

Metadata

Metadata

Assignees

Labels

area/starlarkfeature requestRequests for new plugin and for new features to existing plugins

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions