# IMauiPlatformResource.WithOtlpDevTunnel

- Module: [Aspire.Hosting.Maui](/reference/api/go/aspire.hosting.maui.md)
- Defined on: [IMauiPlatformResource](/reference/api/go/aspire.hosting.maui/imauiplatformresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Configures the MAUI platform resource to send OpenTelemetry data through an automatically created dev tunnel. This is the easiest option for most scenarios, as it handles tunnel creation, configuration, and endpoint injection automatically.

## Remarks

This method creates a dev tunnel automatically and configures the MAUI platform resource to route
OTLP traffic through it. This is the recommended approach for most scenarios as it requires minimal
configuration and works reliably across all mobile platforms.
Prerequisites:
-
-
-

## Definition

```go
type IMauiPlatformResource interface {
    // ... omitted for brevity
    WithOtlpDevTunnel() IMauiPlatformResource
}
```

## Signature

```go
WithOtlpDevTunnel() IMauiPlatformResource
```

## Returns

[`IMauiPlatformResource`](/reference/api/go/aspire.hosting.maui/imauiplatformresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [IMauiPlatformResource](/reference/api/go/aspire.hosting.maui/imauiplatformresource.md) -- `handle`
