diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-09-10 12:16:33 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-09-10 14:05:26 +0000 |
| commit | c97c816133b42257d0bcf1ee4bd178bb2a7a2b9e (patch) | |
| tree | 0bcbc2e540bbf8f62f6c17887cdd53b8c2cee637 /vendor/cloud.google.com/go/logging | |
| parent | 54e657429ab892ad06c90cd7c1a4eb33ba93a3dc (diff) | |
vendor: update
Diffstat (limited to 'vendor/cloud.google.com/go/logging')
12 files changed, 172 insertions, 96 deletions
diff --git a/vendor/cloud.google.com/go/logging/CHANGES.md b/vendor/cloud.google.com/go/logging/CHANGES.md index 799ab3ec8..aced14a09 100644 --- a/vendor/cloud.google.com/go/logging/CHANGES.md +++ b/vendor/cloud.google.com/go/logging/CHANGES.md @@ -1,5 +1,25 @@ # Changes +## [1.11.0](https://github.com/googleapis/google-cloud-go/compare/logging/v1.10.0...logging/v1.11.0) (2024-07-24) + + +### Features + +* **logging:** OpenTelemetry trace/span ID integration for Go logging library ([#10030](https://github.com/googleapis/google-cloud-go/issues/10030)) ([c6711b8](https://github.com/googleapis/google-cloud-go/commit/c6711b83cb6f9f35032e69a40632b7268fcdbd0a)) + + +### Bug Fixes + +* **logging:** Bump google.golang.org/api@v0.187.0 ([8fa9e39](https://github.com/googleapis/google-cloud-go/commit/8fa9e398e512fd8533fd49060371e61b5725a85b)) +* **logging:** Bump google.golang.org/grpc@v1.64.1 ([8ecc4e9](https://github.com/googleapis/google-cloud-go/commit/8ecc4e9622e5bbe9b90384d5848ab816027226c5)) +* **logging:** Skip automatic resource detection if a CommonResource ([#10441](https://github.com/googleapis/google-cloud-go/issues/10441)) ([fc4c910](https://github.com/googleapis/google-cloud-go/commit/fc4c91099443385d3052e1d6cf1020c7918c0e5a)) +* **logging:** Update dependencies ([257c40b](https://github.com/googleapis/google-cloud-go/commit/257c40bd6d7e59730017cf32bda8823d7a232758)) + + +### Documentation + +* **logging:** Documentation for automatic trace/span ID extraction ([#10536](https://github.com/googleapis/google-cloud-go/issues/10536)) ([8cf89a3](https://github.com/googleapis/google-cloud-go/commit/8cf89a340ad75cc1c39e8a9b876b47af069aa273)) + ## [1.10.0](https://github.com/googleapis/google-cloud-go/compare/logging/v1.9.0...logging/v1.10.0) (2024-05-15) diff --git a/vendor/cloud.google.com/go/logging/apiv2/config_client.go b/vendor/cloud.google.com/go/logging/apiv2/config_client.go index 6dffabaf9..e5c64baab 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/config_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/config_client.go @@ -690,7 +690,9 @@ func (c *configGRPCClient) Connection() *grpc.ClientConn { func (c *configGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) - c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } } // Close closes the connection to the API service. The user should invoke this when diff --git a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go index 99894944a..a640cebc2 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go @@ -332,7 +332,9 @@ func (c *gRPCClient) Connection() *grpc.ClientConn { func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) - c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } } // Close closes the connection to the API service. The user should invoke this when diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go index 9c5e2f6c3..2be3cccb2 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v4.25.3 // source: google/logging/v2/log_entry.proto @@ -760,7 +760,7 @@ func file_google_logging_v2_log_entry_proto_rawDescGZIP() []byte { } var file_google_logging_v2_log_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_logging_v2_log_entry_proto_goTypes = []interface{}{ +var file_google_logging_v2_log_entry_proto_goTypes = []any{ (*LogEntry)(nil), // 0: google.logging.v2.LogEntry (*LogEntryOperation)(nil), // 1: google.logging.v2.LogEntryOperation (*LogEntrySourceLocation)(nil), // 2: google.logging.v2.LogEntrySourceLocation @@ -798,7 +798,7 @@ func file_google_logging_v2_log_entry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_logging_v2_log_entry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_log_entry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*LogEntry); i { case 0: return &v.state @@ -810,7 +810,7 @@ func file_google_logging_v2_log_entry_proto_init() { return nil } } - file_google_logging_v2_log_entry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_log_entry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*LogEntryOperation); i { case 0: return &v.state @@ -822,7 +822,7 @@ func file_google_logging_v2_log_entry_proto_init() { return nil } } - file_google_logging_v2_log_entry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_log_entry_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*LogEntrySourceLocation); i { case 0: return &v.state @@ -834,7 +834,7 @@ func file_google_logging_v2_log_entry_proto_init() { return nil } } - file_google_logging_v2_log_entry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_log_entry_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*LogSplit); i { case 0: return &v.state @@ -847,7 +847,7 @@ func file_google_logging_v2_log_entry_proto_init() { } } } - file_google_logging_v2_log_entry_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_google_logging_v2_log_entry_proto_msgTypes[0].OneofWrappers = []any{ (*LogEntry_ProtoPayload)(nil), (*LogEntry_TextPayload)(nil), (*LogEntry_JsonPayload)(nil), diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go index c5085c29c..2e21a84be 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v4.25.3 // source: google/logging/v2/logging.proto @@ -1390,7 +1390,7 @@ func file_google_logging_v2_logging_proto_rawDescGZIP() []byte { var file_google_logging_v2_logging_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_logging_v2_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_google_logging_v2_logging_proto_goTypes = []interface{}{ +var file_google_logging_v2_logging_proto_goTypes = []any{ (TailLogEntriesResponse_SuppressionInfo_Reason)(0), // 0: google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason (*DeleteLogRequest)(nil), // 1: google.logging.v2.DeleteLogRequest (*WriteLogEntriesRequest)(nil), // 2: google.logging.v2.WriteLogEntriesRequest @@ -1452,7 +1452,7 @@ func file_google_logging_v2_logging_proto_init() { } file_google_logging_v2_log_entry_proto_init() if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeleteLogRequest); i { case 0: return &v.state @@ -1464,7 +1464,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*WriteLogEntriesRequest); i { case 0: return &v.state @@ -1476,7 +1476,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*WriteLogEntriesResponse); i { case 0: return &v.state @@ -1488,7 +1488,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*WriteLogEntriesPartialErrors); i { case 0: return &v.state @@ -1500,7 +1500,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListLogEntriesRequest); i { case 0: return &v.state @@ -1512,7 +1512,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ListLogEntriesResponse); i { case 0: return &v.state @@ -1524,7 +1524,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListMonitoredResourceDescriptorsRequest); i { case 0: return &v.state @@ -1536,7 +1536,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListMonitoredResourceDescriptorsResponse); i { case 0: return &v.state @@ -1548,7 +1548,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ListLogsRequest); i { case 0: return &v.state @@ -1560,7 +1560,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*ListLogsResponse); i { case 0: return &v.state @@ -1572,7 +1572,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*TailLogEntriesRequest); i { case 0: return &v.state @@ -1584,7 +1584,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*TailLogEntriesResponse); i { case 0: return &v.state @@ -1596,7 +1596,7 @@ func file_google_logging_v2_logging_proto_init() { return nil } } - file_google_logging_v2_logging_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*TailLogEntriesResponse_SuppressionInfo); i { case 0: return &v.state diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go index 90b45629c..47428daa5 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v4.25.3 // source: google/logging/v2/logging_config.proto @@ -5847,7 +5847,7 @@ func file_google_logging_v2_logging_config_proto_rawDescGZIP() []byte { var file_google_logging_v2_logging_config_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_google_logging_v2_logging_config_proto_msgTypes = make([]protoimpl.MessageInfo, 50) -var file_google_logging_v2_logging_config_proto_goTypes = []interface{}{ +var file_google_logging_v2_logging_config_proto_goTypes = []any{ (OperationState)(0), // 0: google.logging.v2.OperationState (LifecycleState)(0), // 1: google.logging.v2.LifecycleState (IndexType)(0), // 2: google.logging.v2.IndexType @@ -6040,7 +6040,7 @@ func file_google_logging_v2_logging_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*IndexConfig); i { case 0: return &v.state @@ -6052,7 +6052,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*LogBucket); i { case 0: return &v.state @@ -6064,7 +6064,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*LogView); i { case 0: return &v.state @@ -6076,7 +6076,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*LogSink); i { case 0: return &v.state @@ -6088,7 +6088,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*BigQueryDataset); i { case 0: return &v.state @@ -6100,7 +6100,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Link); i { case 0: return &v.state @@ -6112,7 +6112,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BigQueryOptions); i { case 0: return &v.state @@ -6124,7 +6124,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListBucketsRequest); i { case 0: return &v.state @@ -6136,7 +6136,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ListBucketsResponse); i { case 0: return &v.state @@ -6148,7 +6148,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*CreateBucketRequest); i { case 0: return &v.state @@ -6160,7 +6160,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*UpdateBucketRequest); i { case 0: return &v.state @@ -6172,7 +6172,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*GetBucketRequest); i { case 0: return &v.state @@ -6184,7 +6184,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*DeleteBucketRequest); i { case 0: return &v.state @@ -6196,7 +6196,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*UndeleteBucketRequest); i { case 0: return &v.state @@ -6208,7 +6208,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ListViewsRequest); i { case 0: return &v.state @@ -6220,7 +6220,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ListViewsResponse); i { case 0: return &v.state @@ -6232,7 +6232,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*CreateViewRequest); i { case 0: return &v.state @@ -6244,7 +6244,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*UpdateViewRequest); i { case 0: return &v.state @@ -6256,7 +6256,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*GetViewRequest); i { case 0: return &v.state @@ -6268,7 +6268,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*DeleteViewRequest); i { case 0: return &v.state @@ -6280,7 +6280,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ListSinksRequest); i { case 0: return &v.state @@ -6292,7 +6292,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*ListSinksResponse); i { case 0: return &v.state @@ -6304,7 +6304,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GetSinkRequest); i { case 0: return &v.state @@ -6316,7 +6316,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*CreateSinkRequest); i { case 0: return &v.state @@ -6328,7 +6328,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*UpdateSinkRequest); i { case 0: return &v.state @@ -6340,7 +6340,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*DeleteSinkRequest); i { case 0: return &v.state @@ -6352,7 +6352,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*CreateLinkRequest); i { case 0: return &v.state @@ -6364,7 +6364,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*DeleteLinkRequest); i { case 0: return &v.state @@ -6376,7 +6376,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*ListLinksRequest); i { case 0: return &v.state @@ -6388,7 +6388,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*ListLinksResponse); i { case 0: return &v.state @@ -6400,7 +6400,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*GetLinkRequest); i { case 0: return &v.state @@ -6412,7 +6412,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*LogExclusion); i { case 0: return &v.state @@ -6424,7 +6424,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*ListExclusionsRequest); i { case 0: return &v.state @@ -6436,7 +6436,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*ListExclusionsResponse); i { case 0: return &v.state @@ -6448,7 +6448,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*GetExclusionRequest); i { case 0: return &v.state @@ -6460,7 +6460,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*CreateExclusionRequest); i { case 0: return &v.state @@ -6472,7 +6472,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*UpdateExclusionRequest); i { case 0: return &v.state @@ -6484,7 +6484,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*DeleteExclusionRequest); i { case 0: return &v.state @@ -6496,7 +6496,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*GetCmekSettingsRequest); i { case 0: return &v.state @@ -6508,7 +6508,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*UpdateCmekSettingsRequest); i { case 0: return &v.state @@ -6520,7 +6520,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[40].Exporter = func(v any, i int) any { switch v := v.(*CmekSettings); i { case 0: return &v.state @@ -6532,7 +6532,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[41].Exporter = func(v any, i int) any { switch v := v.(*GetSettingsRequest); i { case 0: return &v.state @@ -6544,7 +6544,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[42].Exporter = func(v any, i int) any { switch v := v.(*UpdateSettingsRequest); i { case 0: return &v.state @@ -6556,7 +6556,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[43].Exporter = func(v any, i int) any { switch v := v.(*Settings); i { case 0: return &v.state @@ -6568,7 +6568,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[44].Exporter = func(v any, i int) any { switch v := v.(*CopyLogEntriesRequest); i { case 0: return &v.state @@ -6580,7 +6580,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[45].Exporter = func(v any, i int) any { switch v := v.(*CopyLogEntriesMetadata); i { case 0: return &v.state @@ -6592,7 +6592,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[46].Exporter = func(v any, i int) any { switch v := v.(*CopyLogEntriesResponse); i { case 0: return &v.state @@ -6604,7 +6604,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[47].Exporter = func(v any, i int) any { switch v := v.(*BucketMetadata); i { case 0: return &v.state @@ -6616,7 +6616,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[48].Exporter = func(v any, i int) any { switch v := v.(*LinkMetadata); i { case 0: return &v.state @@ -6628,7 +6628,7 @@ func file_google_logging_v2_logging_config_proto_init() { return nil } } - file_google_logging_v2_logging_config_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_config_proto_msgTypes[49].Exporter = func(v any, i int) any { switch v := v.(*LocationMetadata); i { case 0: return &v.state @@ -6641,14 +6641,14 @@ func file_google_logging_v2_logging_config_proto_init() { } } } - file_google_logging_v2_logging_config_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_google_logging_v2_logging_config_proto_msgTypes[3].OneofWrappers = []any{ (*LogSink_BigqueryOptions)(nil), } - file_google_logging_v2_logging_config_proto_msgTypes[47].OneofWrappers = []interface{}{ + file_google_logging_v2_logging_config_proto_msgTypes[47].OneofWrappers = []any{ (*BucketMetadata_CreateBucketRequest)(nil), (*BucketMetadata_UpdateBucketRequest)(nil), } - file_google_logging_v2_logging_config_proto_msgTypes[48].OneofWrappers = []interface{}{ + file_google_logging_v2_logging_config_proto_msgTypes[48].OneofWrappers = []any{ (*LinkMetadata_CreateLinkRequest)(nil), (*LinkMetadata_DeleteLinkRequest)(nil), } diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go index af98879ca..db4193b7b 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v4.25.3 // source: google/logging/v2/logging_metrics.proto @@ -922,7 +922,7 @@ func file_google_logging_v2_logging_metrics_proto_rawDescGZIP() []byte { var file_google_logging_v2_logging_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_logging_v2_logging_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_google_logging_v2_logging_metrics_proto_goTypes = []interface{}{ +var file_google_logging_v2_logging_metrics_proto_goTypes = []any{ (LogMetric_ApiVersion)(0), // 0: google.logging.v2.LogMetric.ApiVersion (*LogMetric)(nil), // 1: google.logging.v2.LogMetric (*ListLogMetricsRequest)(nil), // 2: google.logging.v2.ListLogMetricsRequest @@ -970,7 +970,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*LogMetric); i { case 0: return &v.state @@ -982,7 +982,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListLogMetricsRequest); i { case 0: return &v.state @@ -994,7 +994,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListLogMetricsResponse); i { case 0: return &v.state @@ -1006,7 +1006,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetLogMetricRequest); i { case 0: return &v.state @@ -1018,7 +1018,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*CreateLogMetricRequest); i { case 0: return &v.state @@ -1030,7 +1030,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*UpdateLogMetricRequest); i { case 0: return &v.state @@ -1042,7 +1042,7 @@ func file_google_logging_v2_logging_metrics_proto_init() { return nil } } - file_google_logging_v2_logging_metrics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_logging_v2_logging_metrics_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*DeleteLogMetricRequest); i { case 0: return &v.state diff --git a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go index ceb860c09..c2a35aabc 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go @@ -286,7 +286,9 @@ func (c *metricsGRPCClient) Connection() *grpc.ClientConn { func (c *metricsGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) - c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } } // Close closes the connection to the API service. The user should invoke this when diff --git a/vendor/cloud.google.com/go/logging/doc.go b/vendor/cloud.google.com/go/logging/doc.go index 343d99e0c..2ed275b4d 100644 --- a/vendor/cloud.google.com/go/logging/doc.go +++ b/vendor/cloud.google.com/go/logging/doc.go @@ -146,5 +146,34 @@ parent.Timestamp marks the end of the request.) You should observe the child log entries grouped under the parent on the console. The parent entry will not inherit the severity of its children; you must update the parent severity yourself. + +# Automatic Trace/Span ID Extraction + +You can automatically populate the Trace, SpanID, and TraceSampled fields of an Entry object by providing an [http.Request] object +within the Entry's HTTPRequest field: + + logging.Entry{ + HTTPRequest: &logging.HTTPRequest{ + Request: // Reference to your http.Request here + } + } + +When Entry with an [http.Request] is logged, its Trace, SpanID, and TraceSampled fields may be automatically populated as follows: + + 1. If you are instrumenting your application with [OpenTelemetry], more specifically [otelhttp], + the Entry's Trace, SpanID, and TraceSampled will be populated with information from the [http.Request]'s span context. + 2. Trace, SpanID, and TraceSampled fields will be populated from information from the http.Request's [W3C Traceparent] + or [X-Cloud-Trace-Context] headers, if those headers exist. + +Note that if Trace, SpanID, or TraceSampled are explicitly provided within an Entry object, then those values take precedence over values automatically +extracted values. + +[http.Request]: https://pkg.go.dev/net/http#Request +[OpenTelemetry]: https://opentelemetry.io/docs/languages/go/ +[otelhttp]: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp +[W3C Traceparent]: https://www.w3.org/TR/trace-context +[X-Cloud-Trace-Context]: https://cloud.google.com/trace/docs/trace-context#legacy-http-header + +[OpenTelemetry span context]: https://pkg.go.dev/go.opentelemetry.io/otel/trace#SpanContext */ package logging // import "cloud.google.com/go/logging" diff --git a/vendor/cloud.google.com/go/logging/internal/version.go b/vendor/cloud.google.com/go/logging/internal/version.go index 185052788..77cefca24 100644 --- a/vendor/cloud.google.com/go/logging/internal/version.go +++ b/vendor/cloud.google.com/go/logging/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.10.0" +const Version = "1.11.0" diff --git a/vendor/cloud.google.com/go/logging/logging.go b/vendor/cloud.google.com/go/logging/logging.go index 8d79ed54a..843fc70c3 100644 --- a/vendor/cloud.google.com/go/logging/logging.go +++ b/vendor/cloud.google.com/go/logging/logging.go @@ -41,6 +41,8 @@ import ( "time" "unicode/utf8" + "go.opentelemetry.io/otel/trace" + vkit "cloud.google.com/go/logging/apiv2" logpb "cloud.google.com/go/logging/apiv2/loggingpb" "cloud.google.com/go/logging/internal" @@ -277,6 +279,7 @@ type Logger struct { // Options commonResource *mrpb.MonitoredResource + commonResourceSet bool commonLabels map[string]string ctxFunc func() (context.Context, func()) populateSourceLocation int @@ -321,14 +324,11 @@ func (r *loggerRetryer) Retry(err error) (pause time.Duration, shouldRetry bool) // characters: [A-Za-z0-9]; and punctuation characters: forward-slash, // underscore, hyphen, and period. func (c *Client) Logger(logID string, opts ...LoggerOption) *Logger { - r := detectResourceInternal() - if r == nil { - r = monitoredResource(c.parent) - } l := &Logger{ client: c, logName: internal.LogPath(c.parent, logID), - commonResource: r, + commonResource: nil, + commonResourceSet: false, ctxFunc: func() (context.Context, func()) { return context.Background(), nil }, populateSourceLocation: DoNotPopulateSourceLocation, partialSuccess: false, @@ -342,9 +342,20 @@ func (c *Client) Logger(logID string, opts ...LoggerOption) *Logger { l.bundler.BundleByteThreshold = DefaultEntryByteThreshold l.bundler.BundleByteLimit = DefaultBundleByteLimit l.bundler.BufferedByteLimit = DefaultBufferedByteLimit + for _, opt := range opts { opt.set(l) } + + // Set common resource here so that we skip automatic resource detection + // if a user has provided a common resource. + if !l.commonResourceSet { + l.commonResource = detectResourceInternal() + if l.commonResource == nil { + l.commonResource = monitoredResource(c.parent) + } + } + l.stdLoggers = map[Severity]*log.Logger{} for s := range severityName { e := Entry{Severity: s} @@ -813,6 +824,13 @@ func populateTraceInfo(e *Entry, req *http.Request) bool { return false } } + otelSpanContext := trace.SpanContextFromContext(req.Context()) + if otelSpanContext.IsValid() { + e.Trace = otelSpanContext.TraceID().String() + e.SpanID = otelSpanContext.SpanID().String() + e.TraceSampled = otelSpanContext.IsSampled() + return true + } header := req.Header.Get("Traceparent") if header != "" { // do not use traceSampled flag defined by traceparent because diff --git a/vendor/cloud.google.com/go/logging/resource.go b/vendor/cloud.google.com/go/logging/resource.go index 737c6d039..edf7f39db 100644 --- a/vendor/cloud.google.com/go/logging/resource.go +++ b/vendor/cloud.google.com/go/logging/resource.go @@ -31,7 +31,10 @@ func CommonResource(r *mrpb.MonitoredResource) LoggerOption { return commonResou type commonResource struct{ *mrpb.MonitoredResource } -func (r commonResource) set(l *Logger) { l.commonResource = r.MonitoredResource } +func (r commonResource) set(l *Logger) { + l.commonResourceSet = true + l.commonResource = r.MonitoredResource +} type resource struct { pb *mrpb.MonitoredResource |
