Skip to content

Commit

Permalink
[pkg/ottl] Rename ottldatapoints to ottldatapoint (open-telemetry#16245)
Browse files Browse the repository at this point in the history
* Rename ottldatapoints to ottldatapoint

* add changelog entry

* fix lint
  • Loading branch information
TylerHelmuth authored and shalper2 committed Dec 6, 2022
1 parent a498243 commit 7329b64
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 55 deletions.
16 changes: 16 additions & 0 deletions .chloggen/ottl-rename-ottldatapoints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: pkg/ottl

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Rename `ottldatapoints` to `ottldatapoint`

# One or more tracking issues related to the change
issues: [16245]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# DataPoints Context
# DataPoint Context

The DataPoints Context is a Context implementation for [pdata DataPoints](https://github.com/open-telemetry/opentelemetry-collector/tree/main/pdata/pmetric), the collector's internal representation for OTLP metric data points. This Context should be used when interacting with individual OTLP data points.
The DataPoint Context is a Context implementation for [pdata DataPoints](https://github.com/open-telemetry/opentelemetry-collector/tree/main/pdata/pmetric), the collector's internal representation for OTLP metric data points. This Context should be used when interacting with individual OTLP data points.

## Paths
In general, the DataPoints Context supports accessing pdata using the field names from the [metrics proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto). All integers are returned and set via `int64`. All doubles are returned and set via `float64`.
In general, the DataPoint Context supports accessing pdata using the field names from the [metrics proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto). All integers are returned and set via `int64`. All doubles are returned and set via `float64`.

The following fields are the exception.

Expand Down Expand Up @@ -37,7 +37,7 @@ The following fields are the exception.

## Enums

The DataPoints Context supports the enum names from the [metrics proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto).
The DataPoint Context supports the enum names from the [metrics proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto).

In addition, it also supports an enum for metrics data type, with the numeric value being [defined by pdata](https://github.com/open-telemetry/opentelemetry-collector/blob/main/pdata/pmetric/metrics.go).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package ottldatapoints // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
package ottldatapoint // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package ottldatapoints
package ottldatapoint

import (
"context"
Expand Down
8 changes: 4 additions & 4 deletions processor/routingprocessor/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"go.uber.org/multierr"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor/internal/common"
)

Expand All @@ -35,7 +35,7 @@ type metricsProcessor struct {
config *Config

extractor extractor
router router[component.MetricsExporter, ottldatapoints.TransformContext]
router router[component.MetricsExporter, ottldatapoint.TransformContext]
}

func newMetricProcessor(settings component.TelemetrySettings, config component.ProcessorConfig) *metricsProcessor {
Expand All @@ -48,7 +48,7 @@ func newMetricProcessor(settings component.TelemetrySettings, config component.P
cfg.Table,
cfg.DefaultExporters,
settings,
ottldatapoints.NewParser(common.Functions[ottldatapoints.TransformContext](), settings),
ottldatapoint.NewParser(common.Functions[ottldatapoint.TransformContext](), settings),
),
extractor: newExtractor(cfg.FromAttribute, settings.Logger),
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func (p *metricsProcessor) route(ctx context.Context, tm pmetric.Metrics) error

for i := 0; i < tm.ResourceMetrics().Len(); i++ {
rmetrics := tm.ResourceMetrics().At(i)
mtx := ottldatapoints.NewTransformContext(
mtx := ottldatapoint.NewTransformContext(
nil,
pmetric.Metric{},
pmetric.MetricSlice{},
Expand Down
2 changes: 1 addition & 1 deletion processor/transformprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The contexts allow the OTTL to interact with the underlying telemetry data in it
- [Traces Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottltraces)
- [SpanEvent Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspanevent)
- [Metric Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlmetric)
- [DataPoint Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottldatapoints)
- [DataPoint Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottldatapoint) <!-- markdown-link-check-disable-line -->
- [Logs Context](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottllogs)

Each context allows transformation of its type of telemetry.
Expand Down
6 changes: 3 additions & 3 deletions processor/transformprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/config"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllogs"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottltraces"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common"
Expand Down Expand Up @@ -81,8 +81,8 @@ func (c *Config) Validate() error {
}

if len(c.Metrics.Statements) > 0 {
ottlmetricsp := ottldatapoints.NewParser(metrics.Functions(), component.TelemetrySettings{Logger: zap.NewNop()})
_, err := ottlmetricsp.ParseStatements(c.Metrics.Statements)
ottldatapointp := ottldatapoint.NewParser(metrics.Functions(), component.TelemetrySettings{Logger: zap.NewNop()})
_, err := ottldatapointp.ParseStatements(c.Metrics.Statements)
if err != nil {
return err
}
Expand Down
18 changes: 9 additions & 9 deletions processor/transformprocessor/internal/common/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlmetric"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlresource"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlscope"
Expand Down Expand Up @@ -61,7 +61,7 @@ func (m metricStatements) ConsumeMetrics(ctx context.Context, md pmetric.Metrics

var _ consumer.Metrics = &dataPointStatements{}

type dataPointStatements []*ottl.Statement[ottldatapoints.TransformContext]
type dataPointStatements []*ottl.Statement[ottldatapoint.TransformContext]

func (d dataPointStatements) Capabilities() consumer.Capabilities {
return consumer.Capabilities{
Expand Down Expand Up @@ -101,7 +101,7 @@ func (d dataPointStatements) ConsumeMetrics(ctx context.Context, md pmetric.Metr

func (d dataPointStatements) handleNumberDataPoints(ctx context.Context, dps pmetric.NumberDataPointSlice, metric pmetric.Metric, metrics pmetric.MetricSlice, is pcommon.InstrumentationScope, resource pcommon.Resource) error {
for i := 0; i < dps.Len(); i++ {
tCtx := ottldatapoints.NewTransformContext(dps.At(i), metric, metrics, is, resource)
tCtx := ottldatapoint.NewTransformContext(dps.At(i), metric, metrics, is, resource)
err := d.callFunctions(ctx, tCtx)
if err != nil {
return err
Expand All @@ -112,7 +112,7 @@ func (d dataPointStatements) handleNumberDataPoints(ctx context.Context, dps pme

func (d dataPointStatements) handleHistogramDataPoints(ctx context.Context, dps pmetric.HistogramDataPointSlice, metric pmetric.Metric, metrics pmetric.MetricSlice, is pcommon.InstrumentationScope, resource pcommon.Resource) error {
for i := 0; i < dps.Len(); i++ {
tCtx := ottldatapoints.NewTransformContext(dps.At(i), metric, metrics, is, resource)
tCtx := ottldatapoint.NewTransformContext(dps.At(i), metric, metrics, is, resource)
err := d.callFunctions(ctx, tCtx)
if err != nil {
return err
Expand All @@ -123,7 +123,7 @@ func (d dataPointStatements) handleHistogramDataPoints(ctx context.Context, dps

func (d dataPointStatements) handleExponetialHistogramDataPoints(ctx context.Context, dps pmetric.ExponentialHistogramDataPointSlice, metric pmetric.Metric, metrics pmetric.MetricSlice, is pcommon.InstrumentationScope, resource pcommon.Resource) error {
for i := 0; i < dps.Len(); i++ {
tCtx := ottldatapoints.NewTransformContext(dps.At(i), metric, metrics, is, resource)
tCtx := ottldatapoint.NewTransformContext(dps.At(i), metric, metrics, is, resource)
err := d.callFunctions(ctx, tCtx)
if err != nil {
return err
Expand All @@ -134,7 +134,7 @@ func (d dataPointStatements) handleExponetialHistogramDataPoints(ctx context.Con

func (d dataPointStatements) handleSummaryDataPoints(ctx context.Context, dps pmetric.SummaryDataPointSlice, metric pmetric.Metric, metrics pmetric.MetricSlice, is pcommon.InstrumentationScope, resource pcommon.Resource) error {
for i := 0; i < dps.Len(); i++ {
tCtx := ottldatapoints.NewTransformContext(dps.At(i), metric, metrics, is, resource)
tCtx := ottldatapoint.NewTransformContext(dps.At(i), metric, metrics, is, resource)
err := d.callFunctions(ctx, tCtx)
if err != nil {
return err
Expand All @@ -143,7 +143,7 @@ func (d dataPointStatements) handleSummaryDataPoints(ctx context.Context, dps pm
return nil
}

func (d dataPointStatements) callFunctions(ctx context.Context, tCtx ottldatapoints.TransformContext) error {
func (d dataPointStatements) callFunctions(ctx context.Context, tCtx ottldatapoint.TransformContext) error {
for _, statement := range d {
_, _, err := statement.Execute(ctx, tCtx)
if err != nil {
Expand All @@ -156,7 +156,7 @@ func (d dataPointStatements) callFunctions(ctx context.Context, tCtx ottldatapoi
type MetricParserCollection struct {
parserCollection
metricParser ottl.Parser[ottlmetric.TransformContext]
dataPointParser ottl.Parser[ottldatapoints.TransformContext]
dataPointParser ottl.Parser[ottldatapoint.TransformContext]
}

type MetricParserCollectionOption func(*MetricParserCollection) error
Expand All @@ -169,7 +169,7 @@ func NewMetricParserCollection(functions map[string]interface{}, settings compon
scopeParser: ottlscope.NewParser(ScopeFunctions(), settings),
},
metricParser: ottlmetric.NewParser(functions, settings),
dataPointParser: ottldatapoints.NewParser(functions, settings),
dataPointParser: ottldatapoint.NewParser(functions, settings),
}

for _, op := range options {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func convertGaugeToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoints.TransformContext], error) {
func convertGaugeToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoint.TransformContext], error) {
var aggTemp pmetric.AggregationTemporality
switch stringAggTemp {
case "delta":
Expand All @@ -35,7 +35,7 @@ func convertGaugeToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottl
return nil, fmt.Errorf("unknown aggregation temporality: %s", stringAggTemp)
}

return func(_ context.Context, tCtx ottldatapoints.TransformContext) (interface{}, error) {
return func(_ context.Context, tCtx ottldatapoint.TransformContext) (interface{}, error) {
metric := tCtx.GetMetric()
if metric.Type() != pmetric.MetricTypeGauge {
return nil, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func Test_convertGaugeToSum(t *testing.T) {
Expand Down Expand Up @@ -126,7 +126,7 @@ func Test_convertGaugeToSum(t *testing.T) {
metric := pmetric.NewMetric()
tt.input.CopyTo(metric)

ctx := ottldatapoints.NewTransformContext(pmetric.NewNumberDataPoint(), metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource())
ctx := ottldatapoint.NewTransformContext(pmetric.NewNumberDataPoint(), metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource())

exprFunc, _ := convertGaugeToSum(tt.stringAggTemp, tt.monotonic)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func convertSumToGauge() (ottl.ExprFunc[ottldatapoints.TransformContext], error) {
return func(_ context.Context, tCtx ottldatapoints.TransformContext) (interface{}, error) {
func convertSumToGauge() (ottl.ExprFunc[ottldatapoint.TransformContext], error) {
return func(_ context.Context, tCtx ottldatapoint.TransformContext) (interface{}, error) {
metric := tCtx.GetMetric()
if metric.Type() != pmetric.MetricTypeSum {
return nil, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func Test_convertSumToGauge(t *testing.T) {
Expand Down Expand Up @@ -94,7 +94,7 @@ func Test_convertSumToGauge(t *testing.T) {
metric := pmetric.NewMetric()
tt.input.CopyTo(metric)

ctx := ottldatapoints.NewTransformContext(pmetric.NewNumberDataPoint(), metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource())
ctx := ottldatapoint.NewTransformContext(pmetric.NewNumberDataPoint(), metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource())

exprFunc, _ := convertSumToGauge()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func convertSummaryCountValToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoints.TransformContext], error) {
func convertSummaryCountValToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoint.TransformContext], error) {
var aggTemp pmetric.AggregationTemporality
switch stringAggTemp {
case "delta":
Expand All @@ -34,7 +34,7 @@ func convertSummaryCountValToSum(stringAggTemp string, monotonic bool) (ottl.Exp
default:
return nil, fmt.Errorf("unknown aggregation temporality: %s", stringAggTemp)
}
return func(_ context.Context, tCtx ottldatapoints.TransformContext) (interface{}, error) {
return func(_ context.Context, tCtx ottldatapoint.TransformContext) (interface{}, error) {
metric := tCtx.GetMetric()
if metric.Type() != pmetric.MetricTypeSummary {
return nil, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func Test_ConvertSummaryCountValToSum(t *testing.T) {
Expand Down Expand Up @@ -108,7 +108,7 @@ func Test_ConvertSummaryCountValToSum(t *testing.T) {
evaluate, err := convertSummaryCountValToSum(tt.temporality, tt.monotonicity)
assert.NoError(t, err)

_, err = evaluate(nil, ottldatapoints.NewTransformContext(pmetric.NewNumberDataPoint(), tt.input, actualMetrics, pcommon.NewInstrumentationScope(), pcommon.NewResource()))
_, err = evaluate(nil, ottldatapoint.NewTransformContext(pmetric.NewNumberDataPoint(), tt.input, actualMetrics, pcommon.NewInstrumentationScope(), pcommon.NewResource()))
assert.Nil(t, err)

expected := pmetric.NewMetricSlice()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func convertSummarySumValToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoints.TransformContext], error) {
func convertSummarySumValToSum(stringAggTemp string, monotonic bool) (ottl.ExprFunc[ottldatapoint.TransformContext], error) {
var aggTemp pmetric.AggregationTemporality
switch stringAggTemp {
case "delta":
Expand All @@ -34,7 +34,7 @@ func convertSummarySumValToSum(stringAggTemp string, monotonic bool) (ottl.ExprF
default:
return nil, fmt.Errorf("unknown aggregation temporality: %s", stringAggTemp)
}
return func(_ context.Context, tCtx ottldatapoints.TransformContext) (interface{}, error) {
return func(_ context.Context, tCtx ottldatapoint.TransformContext) (interface{}, error) {
metric := tCtx.GetMetric()
if metric.Type() != pmetric.MetricTypeSummary {
return nil, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
)

func getTestSummaryMetric() pmetric.Metric {
Expand Down Expand Up @@ -161,7 +161,7 @@ func Test_ConvertSummarySumValToSum(t *testing.T) {
evaluate, err := convertSummarySumValToSum(tt.temporality, tt.monotonicity)
assert.NoError(t, err)

_, err = evaluate(nil, ottldatapoints.NewTransformContext(pmetric.NewNumberDataPoint(), tt.input, actualMetrics, pcommon.NewInstrumentationScope(), pcommon.NewResource()))
_, err = evaluate(nil, ottldatapoint.NewTransformContext(pmetric.NewNumberDataPoint(), tt.input, actualMetrics, pcommon.NewInstrumentationScope(), pcommon.NewResource()))
assert.Nil(t, err)

expected := pmetric.NewMetricSlice()
Expand Down
4 changes: 2 additions & 2 deletions processor/transformprocessor/internal/metrics/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/metrics"

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoints"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common"
)

Expand All @@ -29,7 +29,7 @@ var registry = map[string]interface{}{

func init() {
// Init metrics registry with default functions common to all signals
for k, v := range common.Functions[ottldatapoints.TransformContext]() {
for k, v := range common.Functions[ottldatapoint.TransformContext]() {
registry[k] = v
}
}
Expand Down
Loading

0 comments on commit 7329b64

Please sign in to comment.