1. Packages
  2. Datadog
  3. API Docs
  4. SpansMetric
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.SpansMetric

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

    Provides a Datadog SpansMetric resource. This can be used to create and manage Datadog spans_metric.

    Example Usage

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.SpansMetric;
    import com.pulumi.datadog.SpansMetricArgs;
    import com.pulumi.datadog.inputs.SpansMetricComputeArgs;
    import com.pulumi.datadog.inputs.SpansMetricFilterArgs;
    import com.pulumi.datadog.inputs.SpansMetricGroupByArgs;
    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 testingSpansMetric = new SpansMetric("testingSpansMetric", SpansMetricArgs.builder()        
                .compute(SpansMetricComputeArgs.builder()
                    .aggregation_type("distribution")
                    .include_percentiles(false)
                    .path("@duration")
                    .build())
                .filter(SpansMetricFilterArgs.builder()
                    .query("@http.status_code:200 service:my-service")
                    .build())
                .groupBies(SpansMetricGroupByArgs.builder()
                    .path("resource_name")
                    .tagName("resource_name")
                    .build())
                .name("testing.span.metric")
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      testingSpansMetric:
        type: datadog:SpansMetric
        properties:
          compute:
            aggregation_type: distribution
            include_percentiles: false
            path: '@duration'
          filter:
            query: '@http.status_code:200 service:my-service'
          groupBies:
            - path: resource_name
              tagName: resource_name
          name: testing.span.metric
    

    Create SpansMetric Resource

    new SpansMetric(name: string, args: SpansMetricArgs, opts?: CustomResourceOptions);
    @overload
    def SpansMetric(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    compute: Optional[SpansMetricComputeArgs] = None,
                    filter: Optional[SpansMetricFilterArgs] = None,
                    group_bies: Optional[Sequence[SpansMetricGroupByArgs]] = None,
                    name: Optional[str] = None)
    @overload
    def SpansMetric(resource_name: str,
                    args: SpansMetricArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewSpansMetric(ctx *Context, name string, args SpansMetricArgs, opts ...ResourceOption) (*SpansMetric, error)
    public SpansMetric(string name, SpansMetricArgs args, CustomResourceOptions? opts = null)
    public SpansMetric(String name, SpansMetricArgs args)
    public SpansMetric(String name, SpansMetricArgs args, CustomResourceOptions options)
    
    type: datadog:SpansMetric
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SpansMetricArgs
    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 SpansMetricArgs
    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 SpansMetricArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SpansMetricArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SpansMetricArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SpansMetric Resource Properties

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

    Inputs

    The SpansMetric resource accepts the following input properties:

    Name string

    The name of the span-based metric. This field can't be updated after creation.

    Compute SpansMetricCompute
    Filter SpansMetricFilter
    GroupBies List<SpansMetricGroupBy>
    Name string

    The name of the span-based metric. This field can't be updated after creation.

    Compute SpansMetricComputeArgs
    Filter SpansMetricFilterArgs
    GroupBies []SpansMetricGroupByArgs
    name String

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricCompute
    filter SpansMetricFilter
    groupBies List<SpansMetricGroupBy>
    name string

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricCompute
    filter SpansMetricFilter
    groupBies SpansMetricGroupBy[]
    name str

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricComputeArgs
    filter SpansMetricFilterArgs
    group_bies Sequence[SpansMetricGroupByArgs]
    name String

    The name of the span-based metric. This field can't be updated after creation.

    compute Property Map
    filter Property Map
    groupBies List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SpansMetric 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 SpansMetric Resource

    Get an existing SpansMetric 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?: SpansMetricState, opts?: CustomResourceOptions): SpansMetric
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute: Optional[SpansMetricComputeArgs] = None,
            filter: Optional[SpansMetricFilterArgs] = None,
            group_bies: Optional[Sequence[SpansMetricGroupByArgs]] = None,
            name: Optional[str] = None) -> SpansMetric
    func GetSpansMetric(ctx *Context, name string, id IDInput, state *SpansMetricState, opts ...ResourceOption) (*SpansMetric, error)
    public static SpansMetric Get(string name, Input<string> id, SpansMetricState? state, CustomResourceOptions? opts = null)
    public static SpansMetric get(String name, Output<String> id, SpansMetricState 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:
    Compute SpansMetricCompute
    Filter SpansMetricFilter
    GroupBies List<SpansMetricGroupBy>
    Name string

    The name of the span-based metric. This field can't be updated after creation.

    Compute SpansMetricComputeArgs
    Filter SpansMetricFilterArgs
    GroupBies []SpansMetricGroupByArgs
    Name string

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricCompute
    filter SpansMetricFilter
    groupBies List<SpansMetricGroupBy>
    name String

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricCompute
    filter SpansMetricFilter
    groupBies SpansMetricGroupBy[]
    name string

    The name of the span-based metric. This field can't be updated after creation.

    compute SpansMetricComputeArgs
    filter SpansMetricFilterArgs
    group_bies Sequence[SpansMetricGroupByArgs]
    name str

    The name of the span-based metric. This field can't be updated after creation.

    compute Property Map
    filter Property Map
    groupBies List<Property Map>
    name String

    The name of the span-based metric. This field can't be updated after creation.

    Supporting Types

    SpansMetricCompute, SpansMetricComputeArgs

    AggregationType string

    The type of aggregation to use. This field can't be updated after creation.

    IncludePercentiles bool

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    Path string

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    AggregationType string

    The type of aggregation to use. This field can't be updated after creation.

    IncludePercentiles bool

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    Path string

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    aggregationType String

    The type of aggregation to use. This field can't be updated after creation.

    includePercentiles Boolean

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    path String

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    aggregationType string

    The type of aggregation to use. This field can't be updated after creation.

    includePercentiles boolean

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    path string

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    aggregation_type str

    The type of aggregation to use. This field can't be updated after creation.

    include_percentiles bool

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    path str

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    aggregationType String

    The type of aggregation to use. This field can't be updated after creation.

    includePercentiles Boolean

    Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type is distribution.

    path String

    The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.

    SpansMetricFilter, SpansMetricFilterArgs

    Query string

    The search query - following the span search syntax.

    Query string

    The search query - following the span search syntax.

    query String

    The search query - following the span search syntax.

    query string

    The search query - following the span search syntax.

    query str

    The search query - following the span search syntax.

    query String

    The search query - following the span search syntax.

    SpansMetricGroupBy, SpansMetricGroupByArgs

    Path string

    The path to the value the span-based metric will be aggregated over.

    TagName string

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    Path string

    The path to the value the span-based metric will be aggregated over.

    TagName string

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    path String

    The path to the value the span-based metric will be aggregated over.

    tagName String

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    path string

    The path to the value the span-based metric will be aggregated over.

    tagName string

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    path str

    The path to the value the span-based metric will be aggregated over.

    tag_name str

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    path String

    The path to the value the span-based metric will be aggregated over.

    tagName String

    Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

    Import

     $ pulumi import datadog:index/spansMetric:SpansMetric testing_spans_metric testing.span.metric
    

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the datadog Terraform Provider.

    datadog logo
    Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi