datadog.SpansMetric
Explore with Pulumi AI
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
Spans
Metric Compute - Filter
Spans
Metric Filter - Group
Bies List<SpansMetric Group By>
- Name string
The name of the span-based metric. This field can't be updated after creation.
- Compute
Spans
Metric Compute Args - Filter
Spans
Metric Filter Args - Group
Bies []SpansMetric Group By Args
- name String
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute - filter
Spans
Metric Filter - group
Bies List<SpansMetric Group By>
- name string
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute - filter
Spans
Metric Filter - group
Bies SpansMetric Group By[]
- name str
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute Args - filter
Spans
Metric Filter Args - group_
bies Sequence[SpansMetric Group By Args]
- name String
The name of the span-based metric. This field can't be updated after creation.
- compute Property Map
- filter Property Map
- group
Bies 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.
- Compute
Spans
Metric Compute - Filter
Spans
Metric Filter - Group
Bies List<SpansMetric Group By> - Name string
The name of the span-based metric. This field can't be updated after creation.
- Compute
Spans
Metric Compute Args - Filter
Spans
Metric Filter Args - Group
Bies []SpansMetric Group By Args - Name string
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute - filter
Spans
Metric Filter - group
Bies List<SpansMetric Group By> - name String
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute - filter
Spans
Metric Filter - group
Bies SpansMetric Group By[] - name string
The name of the span-based metric. This field can't be updated after creation.
- compute
Spans
Metric Compute Args - filter
Spans
Metric Filter Args - group_
bies Sequence[SpansMetric Group By Args] - name str
The name of the span-based metric. This field can't be updated after creation.
- compute Property Map
- filter Property Map
- group
Bies List<Property Map> - name String
The name of the span-based metric. This field can't be updated after creation.
Supporting Types
SpansMetricCompute, SpansMetricComputeArgs
- Aggregation
Type string 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
isdistribution
.- 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 string 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
isdistribution
.- 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 String The type of aggregation to use. This field can't be updated after creation.
- include
Percentiles Boolean Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the
aggregation_type
isdistribution
.- 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 string The type of aggregation to use. This field can't be updated after creation.
- include
Percentiles boolean Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the
aggregation_type
isdistribution
.- 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
isdistribution
.- 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.
- aggregation
Type String The type of aggregation to use. This field can't be updated after creation.
- include
Percentiles Boolean Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the
aggregation_type
isdistribution
.- 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
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.