1. Packages
  2. Packages
  3. Chronosphere
  4. API Docs
  5. OtelMetricsIngestion
Viewing docs for Chronosphere v0.9.16
published on Friday, Jun 5, 2026 by Chronosphere
Viewing docs for Chronosphere v0.9.16
published on Friday, Jun 5, 2026 by Chronosphere

    Configures how incoming OTLP metric payloads have their OpenTelemetry resource attributes flattened, filtered, and mapped onto Prometheus-style labels at ingestion.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pulumi = Chronosphere.Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Pulumi.OtelMetricsIngestion("config", new()
        {
            ResourceAttributes = new Pulumi.Inputs.OtelMetricsIngestionResourceAttributesArgs
            {
                ExcludeKeys = new[]
                {
                    "host.id",
                    "process.pid",
                },
                FilterMode = "APPEND_DEFAULT_EXCLUDE_KEYS",
                FlattenMode = "MERGE",
                GenerateTargetInfo = false,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/chronosphereio/pulumi-chronosphere/sdk/go/chronosphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := chronosphere.NewOtelMetricsIngestion(ctx, "config", &chronosphere.OtelMetricsIngestionArgs{
    			ResourceAttributes: &chronosphere.OtelMetricsIngestionResourceAttributesArgs{
    				ExcludeKeys: pulumi.StringArray{
    					pulumi.String("host.id"),
    					pulumi.String("process.pid"),
    				},
    				FilterMode:         pulumi.String("APPEND_DEFAULT_EXCLUDE_KEYS"),
    				FlattenMode:        pulumi.String("MERGE"),
    				GenerateTargetInfo: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.chronosphere.OtelMetricsIngestion;
    import com.pulumi.chronosphere.OtelMetricsIngestionArgs;
    import com.pulumi.chronosphere.inputs.OtelMetricsIngestionResourceAttributesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var config = new OtelMetricsIngestion("config", OtelMetricsIngestionArgs.builder()        
                .resourceAttributes(OtelMetricsIngestionResourceAttributesArgs.builder()
                    .excludeKeys(                
                        "host.id",
                        "process.pid")
                    .filterMode("APPEND_DEFAULT_EXCLUDE_KEYS")
                    .flattenMode("MERGE")
                    .generateTargetInfo(false)
                    .build())
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as chronosphere from "@pulumi-chronosphere/pulumi-chronosphere";
    
    const config = new chronosphere.OtelMetricsIngestion("config", {resourceAttributes: {
        excludeKeys: [
            "host.id",
            "process.pid",
        ],
        filterMode: "APPEND_DEFAULT_EXCLUDE_KEYS",
        flattenMode: "MERGE",
        generateTargetInfo: false,
    }});
    
    import pulumi
    import pulumi_chronosphere as chronosphere
    
    config = chronosphere.OtelMetricsIngestion("config", resource_attributes=chronosphere.OtelMetricsIngestionResourceAttributesArgs(
        exclude_keys=[
            "host.id",
            "process.pid",
        ],
        filter_mode="APPEND_DEFAULT_EXCLUDE_KEYS",
        flatten_mode="MERGE",
        generate_target_info=False,
    ))
    
    resources:
      config:
        type: chronosphere:OtelMetricsIngestion
        properties:
          resourceAttributes:
            excludeKeys:
              - host.id
              - process.pid
            filterMode: APPEND_DEFAULT_EXCLUDE_KEYS
            flattenMode: MERGE
            generateTargetInfo: false
    

    Create OtelMetricsIngestion Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OtelMetricsIngestion(name: string, args?: OtelMetricsIngestionArgs, opts?: CustomResourceOptions);
    @overload
    def OtelMetricsIngestion(resource_name: str,
                             args: Optional[OtelMetricsIngestionArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def OtelMetricsIngestion(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             resource_attributes: Optional[OtelMetricsIngestionResourceAttributesArgs] = None)
    func NewOtelMetricsIngestion(ctx *Context, name string, args *OtelMetricsIngestionArgs, opts ...ResourceOption) (*OtelMetricsIngestion, error)
    public OtelMetricsIngestion(string name, OtelMetricsIngestionArgs? args = null, CustomResourceOptions? opts = null)
    public OtelMetricsIngestion(String name, OtelMetricsIngestionArgs args)
    public OtelMetricsIngestion(String name, OtelMetricsIngestionArgs args, CustomResourceOptions options)
    
    type: chronosphere:OtelMetricsIngestion
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "chronosphere_otelmetricsingestion" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args OtelMetricsIngestionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OtelMetricsIngestionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OtelMetricsIngestionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OtelMetricsIngestionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OtelMetricsIngestionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var otelMetricsIngestionResource = new Pulumi.OtelMetricsIngestion("otelMetricsIngestionResource", new()
    {
        ResourceAttributes = new Pulumi.Inputs.OtelMetricsIngestionResourceAttributesArgs
        {
            ExcludeKeys = new[]
            {
                "string",
            },
            FilterMode = "string",
            FlattenMode = "string",
            GenerateTargetInfo = false,
        },
    });
    
    example, err := chronosphere.NewOtelMetricsIngestion(ctx, "otelMetricsIngestionResource", &chronosphere.OtelMetricsIngestionArgs{
    	ResourceAttributes: &chronosphere.OtelMetricsIngestionResourceAttributesArgs{
    		ExcludeKeys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		FilterMode:         pulumi.String("string"),
    		FlattenMode:        pulumi.String("string"),
    		GenerateTargetInfo: pulumi.Bool(false),
    	},
    })
    
    resource "chronosphere_otelmetricsingestion" "otelMetricsIngestionResource" {
      resource_attributes = {
        exclude_keys         = ["string"]
        filter_mode          = "string"
        flatten_mode         = "string"
        generate_target_info = false
      }
    }
    
    var otelMetricsIngestionResource = new OtelMetricsIngestion("otelMetricsIngestionResource", OtelMetricsIngestionArgs.builder()
        .resourceAttributes(OtelMetricsIngestionResourceAttributesArgs.builder()
            .excludeKeys("string")
            .filterMode("string")
            .flattenMode("string")
            .generateTargetInfo(false)
            .build())
        .build());
    
    otel_metrics_ingestion_resource = chronosphere.OtelMetricsIngestion("otelMetricsIngestionResource", resource_attributes={
        "exclude_keys": ["string"],
        "filter_mode": "string",
        "flatten_mode": "string",
        "generate_target_info": False,
    })
    
    const otelMetricsIngestionResource = new chronosphere.OtelMetricsIngestion("otelMetricsIngestionResource", {resourceAttributes: {
        excludeKeys: ["string"],
        filterMode: "string",
        flattenMode: "string",
        generateTargetInfo: false,
    }});
    
    type: chronosphere:OtelMetricsIngestion
    properties:
        resourceAttributes:
            excludeKeys:
                - string
            filterMode: string
            flattenMode: string
            generateTargetInfo: false
    

    OtelMetricsIngestion Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OtelMetricsIngestion resource accepts the following input properties:

    ResourceAttributes Chronosphere.Pulumi.Inputs.OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    ResourceAttributes OtelMetricsIngestionResourceAttributesArgs
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resource_attributes object
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resource_attributes OtelMetricsIngestionResourceAttributesArgs
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes Property Map
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OtelMetricsIngestion resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing OtelMetricsIngestion Resource

    Get an existing OtelMetricsIngestion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OtelMetricsIngestionState, opts?: CustomResourceOptions): OtelMetricsIngestion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            resource_attributes: Optional[OtelMetricsIngestionResourceAttributesArgs] = None) -> OtelMetricsIngestion
    func GetOtelMetricsIngestion(ctx *Context, name string, id IDInput, state *OtelMetricsIngestionState, opts ...ResourceOption) (*OtelMetricsIngestion, error)
    public static OtelMetricsIngestion Get(string name, Input<string> id, OtelMetricsIngestionState? state, CustomResourceOptions? opts = null)
    public static OtelMetricsIngestion get(String name, Output<String> id, OtelMetricsIngestionState state, CustomResourceOptions options)
    resources:  _:    type: chronosphere:OtelMetricsIngestion    get:      id: ${id}
    import {
      to = chronosphere_otelmetricsingestion.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ResourceAttributes Chronosphere.Pulumi.Inputs.OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    ResourceAttributes OtelMetricsIngestionResourceAttributesArgs
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resource_attributes object
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes OtelMetricsIngestionResourceAttributes
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resource_attributes OtelMetricsIngestionResourceAttributesArgs
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.
    resourceAttributes Property Map
    Controls how OpenTelemetry resource attributes are mapped to Prometheus labels at ingest.

    Supporting Types

    OtelMetricsIngestionResourceAttributes, OtelMetricsIngestionResourceAttributesArgs

    ExcludeKeys List<string>
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    FilterMode string
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    FlattenMode string
    Controls how OTel resource attributes are flattened onto each metric's labels.
    GenerateTargetInfo bool
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    ExcludeKeys []string
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    FilterMode string
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    FlattenMode string
    Controls how OTel resource attributes are flattened onto each metric's labels.
    GenerateTargetInfo bool
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    exclude_keys list(string)
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    filter_mode string
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    flatten_mode string
    Controls how OTel resource attributes are flattened onto each metric's labels.
    generate_target_info bool
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    excludeKeys List<String>
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    filterMode String
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    flattenMode String
    Controls how OTel resource attributes are flattened onto each metric's labels.
    generateTargetInfo Boolean
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    excludeKeys string[]
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    filterMode string
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    flattenMode string
    Controls how OTel resource attributes are flattened onto each metric's labels.
    generateTargetInfo boolean
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    exclude_keys Sequence[str]
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    filter_mode str
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    flatten_mode str
    Controls how OTel resource attributes are flattened onto each metric's labels.
    generate_target_info bool
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.
    excludeKeys List<String>
    Resource attribute keys to exclude from the flatten operation, interpreted according to filter_mode.
    filterMode String
    Controls how exclude_keys is interpreted (e.g. allow-list vs. block-list semantics).
    flattenMode String
    Controls how OTel resource attributes are flattened onto each metric's labels.
    generateTargetInfo Boolean
    If true, generates a target_info time series with labels derived from resource attributes. filter_mode and exclude_keys apply identically to this series. Defaults to false.

    Package Details

    Repository
    chronosphere chronosphereio/pulumi-chronosphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the chronosphere Terraform Provider.
    Viewing docs for Chronosphere v0.9.16
    published on Friday, Jun 5, 2026 by Chronosphere

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial