File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
opentelemetry-stackdriver Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## vNext
4
+
5
+ ### Added
6
+
7
+ - Added support for ` MonitoredResource::CloudRunJob ` [ #100 ] ( https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/100 )
8
+
3
9
## v0.21.0
4
10
5
11
### Changed
Original file line number Diff line number Diff line change @@ -553,6 +553,24 @@ impl From<LogContext> for InternalLogContext {
553
553
fn from ( cx : LogContext ) -> Self {
554
554
let mut labels = HashMap :: default ( ) ;
555
555
let resource = match cx. resource {
556
+ MonitoredResource :: CloudRunJob {
557
+ project_id,
558
+ job_name,
559
+ location,
560
+ } => {
561
+ labels. insert ( "project_id" . to_string ( ) , project_id) ;
562
+ if let Some ( job_name) = job_name {
563
+ labels. insert ( "job_name" . to_string ( ) , job_name) ;
564
+ }
565
+ if let Some ( location) = location {
566
+ labels. insert ( "location" . to_string ( ) , location) ;
567
+ }
568
+
569
+ proto:: api:: MonitoredResource {
570
+ r#type : "cloud_run_job" . to_owned ( ) ,
571
+ labels,
572
+ }
573
+ }
556
574
MonitoredResource :: CloudRunRevision {
557
575
project_id,
558
576
service_name,
@@ -665,6 +683,11 @@ pub enum MonitoredResource {
665
683
job : Option < String > ,
666
684
task_id : Option < String > ,
667
685
} ,
686
+ CloudRunJob {
687
+ project_id : String ,
688
+ job_name : Option < String > ,
689
+ location : Option < String > ,
690
+ } ,
668
691
CloudRunRevision {
669
692
project_id : String ,
670
693
service_name : Option < String > ,
You can’t perform that action at this time.
0 commit comments