aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/cloud.google.com/go/internal
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-09-10 12:16:33 +0200
committerTaras Madan <tarasmadan@google.com>2024-09-10 14:05:26 +0000
commitc97c816133b42257d0bcf1ee4bd178bb2a7a2b9e (patch)
tree0bcbc2e540bbf8f62f6c17887cdd53b8c2cee637 /vendor/cloud.google.com/go/internal
parent54e657429ab892ad06c90cd7c1a4eb33ba93a3dc (diff)
vendor: update
Diffstat (limited to 'vendor/cloud.google.com/go/internal')
-rw-r--r--vendor/cloud.google.com/go/internal/.repo-metadata-full.json138
-rw-r--r--vendor/cloud.google.com/go/internal/detect/detect.go8
-rw-r--r--vendor/cloud.google.com/go/internal/gen_info.sh46
-rw-r--r--vendor/cloud.google.com/go/internal/trace/trace.go92
4 files changed, 222 insertions, 62 deletions
diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
index 655fc5d82..54acae7cd 100644
--- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
+++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
@@ -346,7 +346,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/backupdr/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/baremetalsolution/apiv2": {
@@ -526,7 +526,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/migration/apiv2",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/bigquery/migration/apiv2alpha": {
@@ -589,6 +589,26 @@
"release_level": "stable",
"library_type": "GAPIC_MANUAL"
},
+ "cloud.google.com/go/bigtable/admin/apiv2": {
+ "api_shortname": "bigtableadmin",
+ "distribution_name": "cloud.google.com/go/bigtable/admin/apiv2",
+ "description": "Cloud Bigtable Admin API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigtable/latest/admin/apiv2",
+ "release_level": "stable",
+ "library_type": "GAPIC_AUTO"
+ },
+ "cloud.google.com/go/bigtable/apiv2": {
+ "api_shortname": "bigtable",
+ "distribution_name": "cloud.google.com/go/bigtable/apiv2",
+ "description": "Cloud Bigtable API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigtable/latest/apiv2",
+ "release_level": "stable",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/billing/apiv1": {
"api_shortname": "cloudbilling",
"distribution_name": "cloud.google.com/go/billing/apiv1",
@@ -696,7 +716,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudcontrolspartner/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudcontrolspartner/apiv1beta": {
@@ -736,7 +756,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudquotas/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudtasks/apiv2": {
@@ -1029,6 +1049,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/developerconnect/apiv1": {
+ "api_shortname": "developerconnect",
+ "distribution_name": "cloud.google.com/go/developerconnect/apiv1",
+ "description": "Developer Connect API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/developerconnect/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/dialogflow/apiv2": {
"api_shortname": "dialogflow",
"distribution_name": "cloud.google.com/go/dialogflow/apiv2",
@@ -1156,7 +1186,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/edgenetwork/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/errorreporting": {
@@ -1519,6 +1549,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/managedkafka/apiv1": {
+ "api_shortname": "managedkafka",
+ "distribution_name": "cloud.google.com/go/managedkafka/apiv1",
+ "description": "Apache Kafka for BigQuery API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/managedkafka/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/maps/addressvalidation/apiv1": {
"api_shortname": "addressvalidation",
"distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1",
@@ -1549,16 +1589,6 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
- "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha": {
- "api_shortname": "mapsplatformdatasets",
- "distribution_name": "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha",
- "description": "Maps Platform Datasets API",
- "language": "go",
- "client_library_type": "generated",
- "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/mapsplatformdatasets/apiv1alpha",
- "release_level": "preview",
- "library_type": "GAPIC_AUTO"
- },
"cloud.google.com/go/maps/places/apiv1": {
"api_shortname": "places",
"distribution_name": "cloud.google.com/go/maps/places/apiv1",
@@ -1566,7 +1596,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/places/apiv1",
- "release_level": "stable",
+ "release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/maps/routeoptimization/apiv1": {
@@ -1596,7 +1626,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/solar/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/mediatranslation/apiv1beta1": {
@@ -1749,6 +1779,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/networkservices/apiv1": {
+ "api_shortname": "networkservices",
+ "distribution_name": "cloud.google.com/go/networkservices/apiv1",
+ "description": "Network Services API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/networkservices/latest/apiv1",
+ "release_level": "stable",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/notebooks/apiv1": {
"api_shortname": "notebooks",
"distribution_name": "cloud.google.com/go/notebooks/apiv1",
@@ -1939,6 +1979,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/privilegedaccessmanager/apiv1": {
+ "api_shortname": "privilegedaccessmanager",
+ "distribution_name": "cloud.google.com/go/privilegedaccessmanager/apiv1",
+ "description": "Privileged Access Manager API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/privilegedaccessmanager/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/profiler": {
"api_shortname": "cloudprofiler",
"distribution_name": "cloud.google.com/go/profiler",
@@ -2112,7 +2162,7 @@
"cloud.google.com/go/retail/apiv2": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2",
- "description": "Retail API",
+ "description": "Vertex AI Search for Retail API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2",
@@ -2122,7 +2172,7 @@
"cloud.google.com/go/retail/apiv2alpha": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2alpha",
- "description": "Retail API",
+ "description": "Vertex AI Search for Retail API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2alpha",
@@ -2132,7 +2182,7 @@
"cloud.google.com/go/retail/apiv2beta": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2beta",
- "description": "Retail API",
+ "description": "Vertex AI Search for Retail API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2beta",
@@ -2206,7 +2256,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securesourcemanager/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/security/privateca/apiv1": {
@@ -2296,7 +2346,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securitycentermanagement/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/securityposture/apiv1": {
@@ -2389,6 +2439,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/accounts/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/accounts/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/conversions/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1beta",
@@ -2399,6 +2459,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/datasources/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/datasources/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
@@ -2429,6 +2499,26 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/products/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/products/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
+ "cloud.google.com/go/shopping/merchant/promotions/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/promotions/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/quota/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1beta",
@@ -2546,7 +2636,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest/control/apiv2",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/storage/internal/apiv2": {
@@ -2626,7 +2716,7 @@
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/telcoautomation/latest/apiv1",
- "release_level": "preview",
+ "release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/texttospeech/apiv1": {
diff --git a/vendor/cloud.google.com/go/internal/detect/detect.go b/vendor/cloud.google.com/go/internal/detect/detect.go
index 91b8980fc..6a17cbd43 100644
--- a/vendor/cloud.google.com/go/internal/detect/detect.go
+++ b/vendor/cloud.google.com/go/internal/detect/detect.go
@@ -27,7 +27,9 @@ import (
)
const (
- projectIDSentinel = "*detect-project-id*"
+ // ProjectIDSentinel is the value that users should pass for the project ID
+ // to enable detection.
+ ProjectIDSentinel = "*detect-project-id*"
envProjectID = "GOOGLE_CLOUD_PROJECT"
)
@@ -41,8 +43,8 @@ var (
// 1. GOOGLE_CLOUD_PROJECT envvar
// 2. ADC creds.ProjectID
// 3. A static value if the environment is emulated.
-func ProjectID(ctx context.Context, projectID string, emulatorEnvVar string, opts ...option.ClientOption) (string, error) {
- if projectID != projectIDSentinel {
+func ProjectID(ctx context.Context, projectID, emulatorEnvVar string, opts ...option.ClientOption) (string, error) {
+ if projectID != ProjectIDSentinel {
return projectID, nil
}
// 1. Try a well known environment variable
diff --git a/vendor/cloud.google.com/go/internal/gen_info.sh b/vendor/cloud.google.com/go/internal/gen_info.sh
new file mode 100644
index 000000000..59c190653
--- /dev/null
+++ b/vendor/cloud.google.com/go/internal/gen_info.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Script to generate info.go files with methods for all clients.
+
+if [[ $# != 2 ]]; then
+ echo >&2 "usage: $0 DIR PACKAGE"
+ exit 1
+fi
+
+outfile=info.go
+
+cd $1
+
+cat <<'EOF' > $outfile
+// Copyright 2023 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// SetGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Also passes any
+// provided key-value pairs. Intended for use by Google-written clients.
+//
+// Internal use only.
+
+EOF
+
+echo -e >> $outfile "package $2\n"
+
+
+awk '/^func \(c \*[A-Z].*\) setGoogleClientInfo/ {
+ printf("func (c %s SetGoogleClientInfo(keyval ...string) {\n", $3);
+ printf(" c.setGoogleClientInfo(keyval...)\n");
+ printf("}\n\n");
+}' *_client.go >> $outfile
+
+gofmt -w $outfile
diff --git a/vendor/cloud.google.com/go/internal/trace/trace.go b/vendor/cloud.google.com/go/internal/trace/trace.go
index 97738b2cb..e8daf800a 100644
--- a/vendor/cloud.google.com/go/internal/trace/trace.go
+++ b/vendor/cloud.google.com/go/internal/trace/trace.go
@@ -33,17 +33,22 @@ import (
)
const (
+ // Deprecated: The default experimental tracing support for OpenCensus is
+ // now deprecated in the Google Cloud client libraries for Go.
// TelemetryPlatformTracingOpenCensus is the value to which the environment
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
// set to enable OpenCensus tracing.
TelemetryPlatformTracingOpenCensus = "opencensus"
- // TelemetryPlatformTracingOpenCensus is the value to which the environment
+ // TelemetryPlatformTracingOpenTelemetry is the value to which the environment
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
// set to enable OpenTelemetry tracing.
TelemetryPlatformTracingOpenTelemetry = "opentelemetry"
- // TelemetryPlatformTracingOpenCensus is the name of the environment
- // variable that can be set to change the default tracing from OpenCensus
- // to OpenTelemetry.
+ // TelemetryPlatformTracingVar is the name of the environment
+ // variable that can be set to change the default tracing from OpenTelemetry
+ // to OpenCensus.
+ //
+ // The default experimental tracing support for OpenCensus is now deprecated
+ // in the Google Cloud client libraries for Go.
TelemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
// OpenTelemetryTracerName is the name given to the OpenTelemetry Tracer
// when it is obtained from the OpenTelemetry TracerProvider.
@@ -51,47 +56,58 @@ const (
)
var (
- // openTelemetryTracingEnabledMu guards access to openTelemetryTracingEnabled field
- openTelemetryTracingEnabledMu = sync.RWMutex{}
- // openTelemetryTracingEnabled is true if the environment variable
+ // openCensusTracingEnabledMu guards access to openCensusTracingEnabled field
+ openCensusTracingEnabledMu = sync.RWMutex{}
+ // openCensusTracingEnabled is true if the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
- // case-insensitive value "opentelemetry".
- openTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
- os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenTelemetry)
+ // case-insensitive value "opencensus".
+ openCensusTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
+ os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenCensus)
)
-// SetOpenTelemetryTracingEnabledField programmatically sets the value provided by GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING for the purpose of unit testing.
-// Do not invoke it directly. Intended for use only in unit tests. Restore original value after each test.
+// SetOpenTelemetryTracingEnabledField programmatically sets the value provided
+// by GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING for the purpose of
+// unit testing. Do not invoke it directly. Intended for use only in unit tests.
+// Restore original value after each test.
+//
+// The default experimental tracing support for OpenCensus is now deprecated in
+// the Google Cloud client libraries for Go.
func SetOpenTelemetryTracingEnabledField(enabled bool) {
- openTelemetryTracingEnabledMu.Lock()
- defer openTelemetryTracingEnabledMu.Unlock()
- openTelemetryTracingEnabled = enabled
+ openCensusTracingEnabledMu.Lock()
+ defer openCensusTracingEnabledMu.Unlock()
+ openCensusTracingEnabled = !enabled
}
+// Deprecated: The default experimental tracing support for OpenCensus is now
+// deprecated in the Google Cloud client libraries for Go.
+//
// IsOpenCensusTracingEnabled returns true if the environment variable
-// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is NOT set to the
-// case-insensitive value "opentelemetry".
+// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
+// case-insensitive value "opencensus".
func IsOpenCensusTracingEnabled() bool {
- return !IsOpenTelemetryTracingEnabled()
+ openCensusTracingEnabledMu.RLock()
+ defer openCensusTracingEnabledMu.RUnlock()
+ return openCensusTracingEnabled
}
// IsOpenTelemetryTracingEnabled returns true if the environment variable
-// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
-// case-insensitive value "opentelemetry".
+// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is NOT set to the
+// case-insensitive value "opencensus".
func IsOpenTelemetryTracingEnabled() bool {
- openTelemetryTracingEnabledMu.RLock()
- defer openTelemetryTracingEnabledMu.RUnlock()
- return openTelemetryTracingEnabled
+ return !IsOpenCensusTracingEnabled()
}
// StartSpan adds a span to the trace with the given name. If IsOpenCensusTracingEnabled
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
// returns true, the span will be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
-// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
-// The default will remain OpenCensus until May 29, 2024, at which time the default will
-// switch to "opentelemetry" and explicitly setting the environment variable to
-// "opencensus" will be required to continue using OpenCensus tracing.
+// value "opencensus" before loading the package to use OpenCensus tracing.
+// The default was OpenCensus until May 29, 2024, at which time the default was
+// changed to "opencensus". Explicitly setting the environment variable to
+// "opencensus" is required to continue using OpenCensus tracing.
+//
+// The default experimental tracing support for OpenCensus is now deprecated in
+// the Google Cloud client libraries for Go.
func StartSpan(ctx context.Context, name string) context.Context {
if IsOpenTelemetryTracingEnabled() {
ctx, _ = otel.GetTracerProvider().Tracer(OpenTelemetryTracerName).Start(ctx, name)
@@ -105,10 +121,13 @@ func StartSpan(ctx context.Context, name string) context.Context {
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
// returns true, the span will be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
-// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
-// The default will remain OpenCensus until May 29, 2024, at which time the default will
-// switch to "opentelemetry" and explicitly setting the environment variable to
-// "opencensus" will be required to continue using OpenCensus tracing.
+// value "opencensus" before loading the package to use OpenCensus tracing.
+// The default was OpenCensus until May 29, 2024, at which time the default was
+// changed to "opencensus". Explicitly setting the environment variable to
+// "opencensus" is required to continue using OpenCensus tracing.
+//
+// The default experimental tracing support for OpenCensus is now deprecated in
+// the Google Cloud client libraries for Go.
func EndSpan(ctx context.Context, err error) {
if IsOpenTelemetryTracingEnabled() {
span := ottrace.SpanFromContext(ctx)
@@ -191,10 +210,13 @@ func httpStatusCodeToOCCode(httpStatusCode int) int32 {
// OpenCensus span. If IsOpenTelemetryTracingEnabled returns true, the expected
// span must be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
-// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
-// The default will remain OpenCensus until May 29, 2024, at which time the default will
-// switch to "opentelemetry" and explicitly setting the environment variable to
-// "opencensus" will be required to continue using OpenCensus tracing.
+// value "opencensus" before loading the package to use OpenCensus tracing.
+// The default was OpenCensus until May 29, 2024, at which time the default was
+// changed to "opencensus". Explicitly setting the environment variable to
+// "opencensus" is required to continue using OpenCensus tracing.
+//
+// The default experimental tracing support for OpenCensus is now deprecated in
+// the Google Cloud client libraries for Go.
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{}) {
if IsOpenTelemetryTracingEnabled() {
attrs := otAttrs(attrMap)