1. Packages
  2. Chronosphere
  3. API Docs
  4. TraceMetricsRule
Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere

chronosphere.TraceMetricsRule

Explore with Pulumi AI

chronosphere logo
Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere

    Create TraceMetricsRule Resource

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

    Constructor syntax

    new TraceMetricsRule(name: string, args: TraceMetricsRuleArgs, opts?: CustomResourceOptions);
    @overload
    def TraceMetricsRule(resource_name: str,
                         args: TraceMetricsRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def TraceMetricsRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         metric_name: Optional[str] = None,
                         name: Optional[str] = None,
                         trace_filter: Optional[TraceMetricsRuleTraceFilterArgs] = None,
                         group_bies: Optional[Sequence[TraceMetricsRuleGroupByArgs]] = None,
                         histogram_buckets_seconds: Optional[Sequence[float]] = None,
                         metric_labels: Optional[Mapping[str, str]] = None,
                         slug: Optional[str] = None)
    func NewTraceMetricsRule(ctx *Context, name string, args TraceMetricsRuleArgs, opts ...ResourceOption) (*TraceMetricsRule, error)
    public TraceMetricsRule(string name, TraceMetricsRuleArgs args, CustomResourceOptions? opts = null)
    public TraceMetricsRule(String name, TraceMetricsRuleArgs args)
    public TraceMetricsRule(String name, TraceMetricsRuleArgs args, CustomResourceOptions options)
    
    type: chronosphere:TraceMetricsRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TraceMetricsRuleArgs
    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 TraceMetricsRuleArgs
    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 TraceMetricsRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TraceMetricsRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TraceMetricsRuleArgs
    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 traceMetricsRuleResource = new Pulumi.TraceMetricsRule("traceMetricsRuleResource", new()
    {
        MetricName = "string",
        Name = "string",
        TraceFilter = new Pulumi.Inputs.TraceMetricsRuleTraceFilterArgs
        {
            Spans = new[]
            {
                new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanArgs
                {
                    Duration = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanDurationArgs
                    {
                        MaxSecs = 0,
                        MinSecs = 0,
                    },
                    Error = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanErrorArgs
                    {
                        Value = false,
                    },
                    MatchType = "string",
                    Operation = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanOperationArgs
                    {
                        InValues = new[]
                        {
                            "string",
                        },
                        Match = "string",
                        Value = "string",
                    },
                    ParentOperation = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanParentOperationArgs
                    {
                        InValues = new[]
                        {
                            "string",
                        },
                        Match = "string",
                        Value = "string",
                    },
                    ParentService = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanParentServiceArgs
                    {
                        InValues = new[]
                        {
                            "string",
                        },
                        Match = "string",
                        Value = "string",
                    },
                    Service = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanServiceArgs
                    {
                        InValues = new[]
                        {
                            "string",
                        },
                        Match = "string",
                        Value = "string",
                    },
                    SpanCount = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanSpanCountArgs
                    {
                        Max = 0,
                        Min = 0,
                    },
                    Tags = new[]
                    {
                        new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanTagArgs
                        {
                            Key = "string",
                            NumericValue = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanTagNumericValueArgs
                            {
                                Comparison = "string",
                                Value = 0,
                            },
                            Value = new Pulumi.Inputs.TraceMetricsRuleTraceFilterSpanTagValueArgs
                            {
                                InValues = new[]
                                {
                                    "string",
                                },
                                Match = "string",
                                Value = "string",
                            },
                        },
                    },
                },
            },
            Trace = new Pulumi.Inputs.TraceMetricsRuleTraceFilterTraceArgs
            {
                Duration = new Pulumi.Inputs.TraceMetricsRuleTraceFilterTraceDurationArgs
                {
                    MaxSecs = 0,
                    MinSecs = 0,
                },
                Error = new Pulumi.Inputs.TraceMetricsRuleTraceFilterTraceErrorArgs
                {
                    Value = false,
                },
            },
        },
        GroupBies = new[]
        {
            new Pulumi.Inputs.TraceMetricsRuleGroupByArgs
            {
                Key = new Pulumi.Inputs.TraceMetricsRuleGroupByKeyArgs
                {
                    Type = "string",
                    NamedKey = "string",
                },
                Label = "string",
            },
        },
        HistogramBucketsSeconds = new[]
        {
            0,
        },
        MetricLabels = 
        {
            { "string", "string" },
        },
        Slug = "string",
    });
    
    example, err := chronosphere.NewTraceMetricsRule(ctx, "traceMetricsRuleResource", &chronosphere.TraceMetricsRuleArgs{
    	MetricName: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	TraceFilter: &chronosphere.TraceMetricsRuleTraceFilterArgs{
    		Spans: chronosphere.TraceMetricsRuleTraceFilterSpanArray{
    			&chronosphere.TraceMetricsRuleTraceFilterSpanArgs{
    				Duration: &chronosphere.TraceMetricsRuleTraceFilterSpanDurationArgs{
    					MaxSecs: pulumi.Float64(0),
    					MinSecs: pulumi.Float64(0),
    				},
    				Error: &chronosphere.TraceMetricsRuleTraceFilterSpanErrorArgs{
    					Value: pulumi.Bool(false),
    				},
    				MatchType: pulumi.String("string"),
    				Operation: &chronosphere.TraceMetricsRuleTraceFilterSpanOperationArgs{
    					InValues: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Match: pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    				ParentOperation: &chronosphere.TraceMetricsRuleTraceFilterSpanParentOperationArgs{
    					InValues: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Match: pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    				ParentService: &chronosphere.TraceMetricsRuleTraceFilterSpanParentServiceArgs{
    					InValues: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Match: pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    				Service: &chronosphere.TraceMetricsRuleTraceFilterSpanServiceArgs{
    					InValues: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Match: pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    				SpanCount: &chronosphere.TraceMetricsRuleTraceFilterSpanSpanCountArgs{
    					Max: pulumi.Int(0),
    					Min: pulumi.Int(0),
    				},
    				Tags: chronosphere.TraceMetricsRuleTraceFilterSpanTagArray{
    					&chronosphere.TraceMetricsRuleTraceFilterSpanTagArgs{
    						Key: pulumi.String("string"),
    						NumericValue: &chronosphere.TraceMetricsRuleTraceFilterSpanTagNumericValueArgs{
    							Comparison: pulumi.String("string"),
    							Value:      pulumi.Float64(0),
    						},
    						Value: &chronosphere.TraceMetricsRuleTraceFilterSpanTagValueArgs{
    							InValues: pulumi.StringArray{
    								pulumi.String("string"),
    							},
    							Match: pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    				},
    			},
    		},
    		Trace: &chronosphere.TraceMetricsRuleTraceFilterTraceArgs{
    			Duration: &chronosphere.TraceMetricsRuleTraceFilterTraceDurationArgs{
    				MaxSecs: pulumi.Float64(0),
    				MinSecs: pulumi.Float64(0),
    			},
    			Error: &chronosphere.TraceMetricsRuleTraceFilterTraceErrorArgs{
    				Value: pulumi.Bool(false),
    			},
    		},
    	},
    	GroupBies: chronosphere.TraceMetricsRuleGroupByArray{
    		&chronosphere.TraceMetricsRuleGroupByArgs{
    			Key: &chronosphere.TraceMetricsRuleGroupByKeyArgs{
    				Type:     pulumi.String("string"),
    				NamedKey: pulumi.String("string"),
    			},
    			Label: pulumi.String("string"),
    		},
    	},
    	HistogramBucketsSeconds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	MetricLabels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Slug: pulumi.String("string"),
    })
    
    var traceMetricsRuleResource = new TraceMetricsRule("traceMetricsRuleResource", TraceMetricsRuleArgs.builder()
        .metricName("string")
        .name("string")
        .traceFilter(TraceMetricsRuleTraceFilterArgs.builder()
            .spans(TraceMetricsRuleTraceFilterSpanArgs.builder()
                .duration(TraceMetricsRuleTraceFilterSpanDurationArgs.builder()
                    .maxSecs(0)
                    .minSecs(0)
                    .build())
                .error(TraceMetricsRuleTraceFilterSpanErrorArgs.builder()
                    .value(false)
                    .build())
                .matchType("string")
                .operation(TraceMetricsRuleTraceFilterSpanOperationArgs.builder()
                    .inValues("string")
                    .match("string")
                    .value("string")
                    .build())
                .parentOperation(TraceMetricsRuleTraceFilterSpanParentOperationArgs.builder()
                    .inValues("string")
                    .match("string")
                    .value("string")
                    .build())
                .parentService(TraceMetricsRuleTraceFilterSpanParentServiceArgs.builder()
                    .inValues("string")
                    .match("string")
                    .value("string")
                    .build())
                .service(TraceMetricsRuleTraceFilterSpanServiceArgs.builder()
                    .inValues("string")
                    .match("string")
                    .value("string")
                    .build())
                .spanCount(TraceMetricsRuleTraceFilterSpanSpanCountArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .tags(TraceMetricsRuleTraceFilterSpanTagArgs.builder()
                    .key("string")
                    .numericValue(TraceMetricsRuleTraceFilterSpanTagNumericValueArgs.builder()
                        .comparison("string")
                        .value(0)
                        .build())
                    .value(TraceMetricsRuleTraceFilterSpanTagValueArgs.builder()
                        .inValues("string")
                        .match("string")
                        .value("string")
                        .build())
                    .build())
                .build())
            .trace(TraceMetricsRuleTraceFilterTraceArgs.builder()
                .duration(TraceMetricsRuleTraceFilterTraceDurationArgs.builder()
                    .maxSecs(0)
                    .minSecs(0)
                    .build())
                .error(TraceMetricsRuleTraceFilterTraceErrorArgs.builder()
                    .value(false)
                    .build())
                .build())
            .build())
        .groupBies(TraceMetricsRuleGroupByArgs.builder()
            .key(TraceMetricsRuleGroupByKeyArgs.builder()
                .type("string")
                .namedKey("string")
                .build())
            .label("string")
            .build())
        .histogramBucketsSeconds(0)
        .metricLabels(Map.of("string", "string"))
        .slug("string")
        .build());
    
    trace_metrics_rule_resource = chronosphere.TraceMetricsRule("traceMetricsRuleResource",
        metric_name="string",
        name="string",
        trace_filter={
            "spans": [{
                "duration": {
                    "max_secs": 0,
                    "min_secs": 0,
                },
                "error": {
                    "value": False,
                },
                "match_type": "string",
                "operation": {
                    "in_values": ["string"],
                    "match": "string",
                    "value": "string",
                },
                "parent_operation": {
                    "in_values": ["string"],
                    "match": "string",
                    "value": "string",
                },
                "parent_service": {
                    "in_values": ["string"],
                    "match": "string",
                    "value": "string",
                },
                "service": {
                    "in_values": ["string"],
                    "match": "string",
                    "value": "string",
                },
                "span_count": {
                    "max": 0,
                    "min": 0,
                },
                "tags": [{
                    "key": "string",
                    "numeric_value": {
                        "comparison": "string",
                        "value": 0,
                    },
                    "value": {
                        "in_values": ["string"],
                        "match": "string",
                        "value": "string",
                    },
                }],
            }],
            "trace": {
                "duration": {
                    "max_secs": 0,
                    "min_secs": 0,
                },
                "error": {
                    "value": False,
                },
            },
        },
        group_bies=[{
            "key": {
                "type": "string",
                "named_key": "string",
            },
            "label": "string",
        }],
        histogram_buckets_seconds=[0],
        metric_labels={
            "string": "string",
        },
        slug="string")
    
    const traceMetricsRuleResource = new chronosphere.TraceMetricsRule("traceMetricsRuleResource", {
        metricName: "string",
        name: "string",
        traceFilter: {
            spans: [{
                duration: {
                    maxSecs: 0,
                    minSecs: 0,
                },
                error: {
                    value: false,
                },
                matchType: "string",
                operation: {
                    inValues: ["string"],
                    match: "string",
                    value: "string",
                },
                parentOperation: {
                    inValues: ["string"],
                    match: "string",
                    value: "string",
                },
                parentService: {
                    inValues: ["string"],
                    match: "string",
                    value: "string",
                },
                service: {
                    inValues: ["string"],
                    match: "string",
                    value: "string",
                },
                spanCount: {
                    max: 0,
                    min: 0,
                },
                tags: [{
                    key: "string",
                    numericValue: {
                        comparison: "string",
                        value: 0,
                    },
                    value: {
                        inValues: ["string"],
                        match: "string",
                        value: "string",
                    },
                }],
            }],
            trace: {
                duration: {
                    maxSecs: 0,
                    minSecs: 0,
                },
                error: {
                    value: false,
                },
            },
        },
        groupBies: [{
            key: {
                type: "string",
                namedKey: "string",
            },
            label: "string",
        }],
        histogramBucketsSeconds: [0],
        metricLabels: {
            string: "string",
        },
        slug: "string",
    });
    
    type: chronosphere:TraceMetricsRule
    properties:
        groupBies:
            - key:
                namedKey: string
                type: string
              label: string
        histogramBucketsSeconds:
            - 0
        metricLabels:
            string: string
        metricName: string
        name: string
        slug: string
        traceFilter:
            spans:
                - duration:
                    maxSecs: 0
                    minSecs: 0
                  error:
                    value: false
                  matchType: string
                  operation:
                    inValues:
                        - string
                    match: string
                    value: string
                  parentOperation:
                    inValues:
                        - string
                    match: string
                    value: string
                  parentService:
                    inValues:
                        - string
                    match: string
                    value: string
                  service:
                    inValues:
                        - string
                    match: string
                    value: string
                  spanCount:
                    max: 0
                    min: 0
                  tags:
                    - key: string
                      numericValue:
                        comparison: string
                        value: 0
                      value:
                        inValues:
                            - string
                        match: string
                        value: string
            trace:
                duration:
                    maxSecs: 0
                    minSecs: 0
                error:
                    value: false
    

    TraceMetricsRule 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 TraceMetricsRule resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TraceMetricsRule 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TraceMetricsRule Resource

    Get an existing TraceMetricsRule 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?: TraceMetricsRuleState, opts?: CustomResourceOptions): TraceMetricsRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group_bies: Optional[Sequence[TraceMetricsRuleGroupByArgs]] = None,
            histogram_buckets_seconds: Optional[Sequence[float]] = None,
            metric_labels: Optional[Mapping[str, str]] = None,
            metric_name: Optional[str] = None,
            name: Optional[str] = None,
            slug: Optional[str] = None,
            trace_filter: Optional[TraceMetricsRuleTraceFilterArgs] = None) -> TraceMetricsRule
    func GetTraceMetricsRule(ctx *Context, name string, id IDInput, state *TraceMetricsRuleState, opts ...ResourceOption) (*TraceMetricsRule, error)
    public static TraceMetricsRule Get(string name, Input<string> id, TraceMetricsRuleState? state, CustomResourceOptions? opts = null)
    public static TraceMetricsRule get(String name, Output<String> id, TraceMetricsRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:

    Supporting Types

    TraceMetricsRuleGroupBy, TraceMetricsRuleGroupByArgs

    TraceMetricsRuleGroupByKey, TraceMetricsRuleGroupByKeyArgs

    Type string
    NamedKey string
    Type string
    NamedKey string
    type String
    namedKey String
    type string
    namedKey string
    type String
    namedKey String

    TraceMetricsRuleTraceFilter, TraceMetricsRuleTraceFilterArgs

    TraceMetricsRuleTraceFilterSpan, TraceMetricsRuleTraceFilterSpanArgs

    TraceMetricsRuleTraceFilterSpanDuration, TraceMetricsRuleTraceFilterSpanDurationArgs

    MaxSecs double
    MinSecs double
    MaxSecs float64
    MinSecs float64
    maxSecs Double
    minSecs Double
    maxSecs number
    minSecs number
    max_secs float
    min_secs float
    maxSecs Number
    minSecs Number

    TraceMetricsRuleTraceFilterSpanError, TraceMetricsRuleTraceFilterSpanErrorArgs

    Value bool
    Value bool
    value Boolean
    value boolean
    value bool
    value Boolean

    TraceMetricsRuleTraceFilterSpanOperation, TraceMetricsRuleTraceFilterSpanOperationArgs

    InValues List<string>
    Match string
    Value string
    InValues []string
    Match string
    Value string
    inValues List<String>
    match String
    value String
    inValues string[]
    match string
    value string
    in_values Sequence[str]
    match str
    value str
    inValues List<String>
    match String
    value String

    TraceMetricsRuleTraceFilterSpanParentOperation, TraceMetricsRuleTraceFilterSpanParentOperationArgs

    InValues List<string>
    Match string
    Value string
    InValues []string
    Match string
    Value string
    inValues List<String>
    match String
    value String
    inValues string[]
    match string
    value string
    in_values Sequence[str]
    match str
    value str
    inValues List<String>
    match String
    value String

    TraceMetricsRuleTraceFilterSpanParentService, TraceMetricsRuleTraceFilterSpanParentServiceArgs

    InValues List<string>
    Match string
    Value string
    InValues []string
    Match string
    Value string
    inValues List<String>
    match String
    value String
    inValues string[]
    match string
    value string
    in_values Sequence[str]
    match str
    value str
    inValues List<String>
    match String
    value String

    TraceMetricsRuleTraceFilterSpanService, TraceMetricsRuleTraceFilterSpanServiceArgs

    InValues List<string>
    Match string
    Value string
    InValues []string
    Match string
    Value string
    inValues List<String>
    match String
    value String
    inValues string[]
    match string
    value string
    in_values Sequence[str]
    match str
    value str
    inValues List<String>
    match String
    value String

    TraceMetricsRuleTraceFilterSpanSpanCount, TraceMetricsRuleTraceFilterSpanSpanCountArgs

    Max int
    Min int
    Max int
    Min int
    max Integer
    min Integer
    max number
    min number
    max int
    min int
    max Number
    min Number

    TraceMetricsRuleTraceFilterSpanTag, TraceMetricsRuleTraceFilterSpanTagArgs

    TraceMetricsRuleTraceFilterSpanTagNumericValue, TraceMetricsRuleTraceFilterSpanTagNumericValueArgs

    Comparison string
    Value double
    Comparison string
    Value float64
    comparison String
    value Double
    comparison string
    value number
    comparison str
    value float
    comparison String
    value Number

    TraceMetricsRuleTraceFilterSpanTagValue, TraceMetricsRuleTraceFilterSpanTagValueArgs

    InValues List<string>
    Match string
    Value string
    InValues []string
    Match string
    Value string
    inValues List<String>
    match String
    value String
    inValues string[]
    match string
    value string
    in_values Sequence[str]
    match str
    value str
    inValues List<String>
    match String
    value String

    TraceMetricsRuleTraceFilterTrace, TraceMetricsRuleTraceFilterTraceArgs

    TraceMetricsRuleTraceFilterTraceDuration, TraceMetricsRuleTraceFilterTraceDurationArgs

    MaxSecs double
    MinSecs double
    MaxSecs float64
    MinSecs float64
    maxSecs Double
    minSecs Double
    maxSecs number
    minSecs number
    max_secs float
    min_secs float
    maxSecs Number
    minSecs Number

    TraceMetricsRuleTraceFilterTraceError, TraceMetricsRuleTraceFilterTraceErrorArgs

    Value bool
    Value bool
    value Boolean
    value boolean
    value bool
    value Boolean

    Package Details

    Repository
    chronosphere chronosphereio/pulumi-chronosphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the chronosphere Terraform Provider.
    chronosphere logo
    Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere