ToolUp.Cloud.Gcp 0.22.0

Prefix Reserved
dotnet add package ToolUp.Cloud.Gcp --version 0.22.0
                    
NuGet\Install-Package ToolUp.Cloud.Gcp -Version 0.22.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ToolUp.Cloud.Gcp" Version="0.22.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ToolUp.Cloud.Gcp" Version="0.22.0" />
                    
Directory.Packages.props
<PackageReference Include="ToolUp.Cloud.Gcp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ToolUp.Cloud.Gcp --version 0.22.0
                    
#r "nuget: ToolUp.Cloud.Gcp, 0.22.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ToolUp.Cloud.Gcp@0.22.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ToolUp.Cloud.Gcp&version=0.22.0
                    
Install as a Cake Addin
#tool nuget:?package=ToolUp.Cloud.Gcp&version=0.22.0
                    
Install as a Cake Tool

ToolUp.Cloud.Gcp

GCP cloud umbrella for the ToolUp Platform SDK (Phase 16c). One <PackageReference> replaces the five per-cloud entries a GCP-targeting consumer would otherwise add manually.

What it pulls

Package What it does
ToolUp.Storage.GoogleCloud IBlobStorage companion against Google Cloud Storage.
ToolUp.Secrets.GcpSecretManager ISecretStore companion against GCP Secret Manager.
ToolUp.AuditSinks.GcsArchive IAuditSink writing gzipped JSONL archives to a Retention-Policy-locked GCS bucket.
ToolUp.Metrics.OpenTelemetry IMetricsSink exposing the BCL Meter for OTel export.
OpenTelemetry.Exporter.OpenTelemetryProtocol Standard OTLP exporter — send to a Cloud Operations collector.

How to enable

  1. Add one reference:

    <PackageReference Include="ToolUp.Cloud.Gcp" />
    
  2. Wire the per-companion components in your composition root as you would each individually — the umbrella does NOT introduce a new abstraction layer. A consumer dropping the umbrella and adding the five inner packages by hand gets byte-identical behaviour.

    open ToolUp.Platform
    open ToolUp.Platform.BlobStorage
    open ToolUp.Platform.AuditSinks.GcsArchive
    open OpenTelemetry
    open OpenTelemetry.Metrics
    
    // Storage + secrets
    let blobStorage = GoogleCloudStorage.create config :> IBlobStorage
    let secretStore = GcpSecretManagerSecretStore.create config :> ISecretStore
    
    // Audit archive
    let auditSink =
        GcsArchive.create
            "gcs-prod-audit"
            { Container = "acme-audit-prod"; PathPrefix = Some "v1" }
            blobStorage
    
    // OTel metrics — switch exporter via TOOLUP_OTEL_EXPORTER convention
    let exporter = System.Environment.GetEnvironmentVariable "TOOLUP_OTEL_EXPORTER"
    
    let meterProvider =
        let builder =
            Sdk.CreateMeterProviderBuilder()
                .AddMeter("ToolUp")
    
        match exporter with
        | "gcp-operations"
        | "otlp"
        | _ ->
            // OTLP to Cloud Operations collector. Set
            // OTEL_EXPORTER_OTLP_ENDPOINT to the collector's address.
            builder.AddOtlpExporter().Build()
    
    ServerApp.empty
    |> ServerApp.withConfig config
    |> ServerApp.withStorage blobStorage
    |> ServerApp.withSecretStore secretStore
    |> ServerApp.withAuditSink auditSink
    |> ServerApp.withMetricsSink (OtelMetricsSink.create StandardMetrics.registrations logger)
    |> ServerApp.run
    

Cloud Operations export path

GCP's recommended metrics path is OTLP-to-collector. Run the OpenTelemetry Collector with Google Cloud Operations exporter, point your app at it via OTEL_EXPORTER_OTLP_ENDPOINT, and the collector handles the export to Cloud Monitoring / Cloud Trace.

Typical deployment shapes:

  • Cloud Run: OTel sidecar container; localhost OTLP endpoint. Workload Identity binds the collector's GCP credentials.
  • GKE: Cloud Operations collector DaemonSet; service-DNS OTLP endpoint.
  • Compute Engine: agent-style collector (ops-agent with OTLP receiver enabled) installed on the VM.

Exporter selection — TOOLUP_OTEL_EXPORTER convention

The umbrella does NOT register OTel itself — that's the consumer's startup code. The TOOLUP_OTEL_EXPORTER env var is a recommended convention your Program.fs can read to switch exporters:

Value Behaviour
gcp-operations OTLP exporter pointed at a Cloud Operations collector. Set OTEL_EXPORTER_OTLP_ENDPOINT to the collector's address.
otlp Same as gcp-operations from this umbrella's perspective — the universal OTLP exporter. The endpoint determines the destination.
unset / other Consumer's choice. Skipping the exporter entirely is supported — the OtelMetricsSink emits to the BCL Meter, which becomes a no-op without a registered listener.

Overriding an individual companion's version

Central Package Management (CPM) honours per-consumer overrides:

<ItemGroup>
  <PackageVersion Include="ToolUp.Cloud.Gcp" Version="0.4.4" />
  <PackageVersion Include="ToolUp.Storage.GoogleCloud" Version="0.5.0-preview1" />
</ItemGroup>

When NOT to use the umbrella

Drop the umbrella and reference the companions individually when:

  • You use GCS but a non-GCP secret store (e.g. HashiCorp Vault).
  • You want a smaller dependency footprint.
  • You're consciously diverging the version of one companion ahead of others.

See also

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.22.0 33 8/27/2026
0.21.0 63 8/26/2026
0.20.1 83 8/20/2026
0.20.0 94 8/19/2026