1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. getTraceDrain
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse
vercel logo
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse

    Provides information about an existing Trace Drain.

    Trace Drains forward OpenTelemetry trace data from your deployments to an OTLP/HTTP compatible endpoint.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = vercel.getTraceDrain({
        id: "drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    });
    
    import pulumi
    import pulumi_vercel as vercel
    
    example = vercel.get_trace_drain(id="drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vercel.LookupTraceDrain(ctx, &vercel.LookupTraceDrainArgs{
    			Id: "drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Vercel.GetTraceDrain.Invoke(new()
        {
            Id = "drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetTraceDrainArgs;
    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) {
            final var example = VercelFunctions.getTraceDrain(GetTraceDrainArgs.builder()
                .id("drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: vercel:getTraceDrain
          arguments:
            id: drn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    Example coming soon!
    

    Using getTraceDrain

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTraceDrain(args: GetTraceDrainArgs, opts?: InvokeOptions): Promise<GetTraceDrainResult>
    function getTraceDrainOutput(args: GetTraceDrainOutputArgs, opts?: InvokeOptions): Output<GetTraceDrainResult>
    def get_trace_drain(id: Optional[str] = None,
                        team_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetTraceDrainResult
    def get_trace_drain_output(id: pulumi.Input[Optional[str]] = None,
                        team_id: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetTraceDrainResult]
    func LookupTraceDrain(ctx *Context, args *LookupTraceDrainArgs, opts ...InvokeOption) (*LookupTraceDrainResult, error)
    func LookupTraceDrainOutput(ctx *Context, args *LookupTraceDrainOutputArgs, opts ...InvokeOption) LookupTraceDrainResultOutput

    > Note: This function is named LookupTraceDrain in the Go SDK.

    public static class GetTraceDrain 
    {
        public static Task<GetTraceDrainResult> InvokeAsync(GetTraceDrainArgs args, InvokeOptions? opts = null)
        public static Output<GetTraceDrainResult> Invoke(GetTraceDrainInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTraceDrainResult> getTraceDrain(GetTraceDrainArgs args, InvokeOptions options)
    public static Output<GetTraceDrainResult> getTraceDrain(GetTraceDrainArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vercel:index/getTraceDrain:getTraceDrain
      arguments:
        # arguments dictionary
    data "vercel_get_trace_drain" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    The ID of the Trace Drain.
    TeamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    Id string
    The ID of the Trace Drain.
    TeamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    id string
    The ID of the Trace Drain.
    team_id string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    id String
    The ID of the Trace Drain.
    teamId String
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    id string
    The ID of the Trace Drain.
    teamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    id str
    The ID of the Trace Drain.
    team_id str
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    id String
    The ID of the Trace Drain.
    teamId String
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.

    getTraceDrain Result

    The following output properties are available:

    DeliveryFormat string
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    Endpoint string
    The OTLP/HTTP traces endpoint.
    Headers Dictionary<string, string>
    Custom headers included in requests to the trace drain endpoint.
    Id string
    The ID of the Trace Drain.
    Name string
    The human-readable name of the Trace Drain.
    ProjectIds List<string>
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    SamplingRules List<Pulumiverse.Vercel.Outputs.GetTraceDrainSamplingRule>
    Ordered sampling rules for traces sent to this drain.
    TeamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    DeliveryFormat string
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    Endpoint string
    The OTLP/HTTP traces endpoint.
    Headers map[string]string
    Custom headers included in requests to the trace drain endpoint.
    Id string
    The ID of the Trace Drain.
    Name string
    The human-readable name of the Trace Drain.
    ProjectIds []string
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    SamplingRules []GetTraceDrainSamplingRule
    Ordered sampling rules for traces sent to this drain.
    TeamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    delivery_format string
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    endpoint string
    The OTLP/HTTP traces endpoint.
    headers map(string)
    Custom headers included in requests to the trace drain endpoint.
    id string
    The ID of the Trace Drain.
    name string
    The human-readable name of the Trace Drain.
    project_ids list(string)
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    sampling_rules list(object)
    Ordered sampling rules for traces sent to this drain.
    team_id string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    endpoint String
    The OTLP/HTTP traces endpoint.
    headers Map<String,String>
    Custom headers included in requests to the trace drain endpoint.
    id String
    The ID of the Trace Drain.
    name String
    The human-readable name of the Trace Drain.
    projectIds List<String>
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    samplingRules List<GetTraceDrainSamplingRule>
    Ordered sampling rules for traces sent to this drain.
    teamId String
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    deliveryFormat string
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    endpoint string
    The OTLP/HTTP traces endpoint.
    headers {[key: string]: string}
    Custom headers included in requests to the trace drain endpoint.
    id string
    The ID of the Trace Drain.
    name string
    The human-readable name of the Trace Drain.
    projectIds string[]
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    samplingRules GetTraceDrainSamplingRule[]
    Ordered sampling rules for traces sent to this drain.
    teamId string
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    delivery_format str
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    endpoint str
    The OTLP/HTTP traces endpoint.
    headers Mapping[str, str]
    Custom headers included in requests to the trace drain endpoint.
    id str
    The ID of the Trace Drain.
    name str
    The human-readable name of the Trace Drain.
    project_ids Sequence[str]
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    sampling_rules Sequence[GetTraceDrainSamplingRule]
    Ordered sampling rules for traces sent to this drain.
    team_id str
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The OTLP/HTTP format trace data is delivered in. Can be json or proto.
    endpoint String
    The OTLP/HTTP traces endpoint.
    headers Map<String>
    Custom headers included in requests to the trace drain endpoint.
    id String
    The ID of the Trace Drain.
    name String
    The human-readable name of the Trace Drain.
    projectIds List<String>
    A list of project IDs that the trace drain is associated with. If omitted, traces are sent for all projects.
    samplingRules List<Property Map>
    Ordered sampling rules for traces sent to this drain.
    teamId String
    The ID of the team the Trace Drain exists under. Required when reading a team resource if a default team has not been set in the provider.

    Supporting Types

    GetTraceDrainSamplingRule

    Environment string
    Environment this sampling rule applies to.
    Rate double
    Sampling rate from 0 to 1.
    RequestPath string
    Request path prefix this sampling rule applies to.
    Environment string
    Environment this sampling rule applies to.
    Rate float64
    Sampling rate from 0 to 1.
    RequestPath string
    Request path prefix this sampling rule applies to.
    environment string
    Environment this sampling rule applies to.
    rate number
    Sampling rate from 0 to 1.
    request_path string
    Request path prefix this sampling rule applies to.
    environment String
    Environment this sampling rule applies to.
    rate Double
    Sampling rate from 0 to 1.
    requestPath String
    Request path prefix this sampling rule applies to.
    environment string
    Environment this sampling rule applies to.
    rate number
    Sampling rate from 0 to 1.
    requestPath string
    Request path prefix this sampling rule applies to.
    environment str
    Environment this sampling rule applies to.
    rate float
    Sampling rate from 0 to 1.
    request_path str
    Request path prefix this sampling rule applies to.
    environment String
    Environment this sampling rule applies to.
    rate Number
    Sampling rate from 0 to 1.
    requestPath String
    Request path prefix this sampling rule applies to.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Viewing docs for Vercel v5.4.1
    published on Wednesday, Jul 22, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial