File tree Expand file tree Collapse file tree 8 files changed +3171
-0
lines changed Expand file tree Collapse file tree 8 files changed +3171
-0
lines changed Original file line number Diff line number Diff line change 1+ #  gitignore template for Bazel build system
2+ #  website: https://bazel.build/
3+ 
4+ #  Ignore all bazel-* symlinks. There is no full list since this can change
5+ #  based on the name of the directory bazel is cloned into.
6+ /bazel- * 
7+ 
8+ #  Directories for the Bazel IntelliJ plugin containing the generated
9+ #  IntelliJ project files and plugin configuration. Seperate directories are
10+ #  for the IntelliJ, Android Studio and CLion versions of the plugin.
11+ /.ijwb /
12+ /.aswb /
13+ /.clwb /
Original file line number Diff line number Diff line change 1+ # module( 
2+ #     name = "my-module", 
3+ #     version = "1.0", 
4+ # ) 
5+ 
6+ # See https://rules-python.readthedocs.io/en/latest/getting-started.html 
7+ 
8+ # Update the version "0.0.0" to the release found here: 
9+ # https://github.com/bazelbuild/rules_python/releases. 
10+ bazel_dep (name  =  "rules_python" , version  =  "1.0.0" )
11+ 
12+ pip  =  use_extension ("@rules_python//python/extensions:pip.bzl" , "pip" )
13+ pip .parse (
14+     hub_name  =  "my_deps" ,
15+     python_version  =  "3.11" ,
16+     requirements_lock  =  "//:requirements.lock.txt" ,
17+ )
18+ use_repo (pip , "my_deps" )
Original file line number Diff line number Diff line change 1+ load ("@my_deps//:requirements.bzl" , "requirement" )
2+ load ("@rules_python//python:py_binary.bzl" , "py_binary" )
3+ 
4+ py_binary (
5+     name  =  "main" ,
6+     srcs  =  ["main.py" ],
7+     deps  =  [
8+         requirement ("opentelemetry-api" ),
9+         requirement ("opentelemetry-sdk" ),
10+     ],
11+ )
Original file line number Diff line number Diff line change 1+ import  time 
2+ 
3+ from  opentelemetry  import  trace 
4+ from  opentelemetry .sdk .trace  import  TracerProvider 
5+ from  opentelemetry .sdk .trace .export  import  (
6+     BatchSpanProcessor ,
7+     ConsoleSpanExporter ,
8+ )
9+ 
10+ tp  =  TracerProvider ()
11+ tp .add_span_processor (BatchSpanProcessor (ConsoleSpanExporter ()))
12+ trace .set_tracer_provider (tp )
13+ 
14+ tracer  =  trace .get_tracer ("foo" )
15+ with  tracer .start_as_current_span ("hello" ) as  span :
16+     time .sleep (0.1 )
Original file line number Diff line number Diff line change 1+ opentelemetry-api
2+ opentelemetry-sdk
Original file line number Diff line number Diff line change 1+ # This file was autogenerated by uv via the following command:
2+ #    uv pip compile requirements.in -o requirements.lock.txt
3+ deprecated==1.2.15
4+     # via
5+     #   opentelemetry-api
6+     #   opentelemetry-semantic-conventions
7+ importlib-metadata==8.5.0
8+     # via opentelemetry-api
9+ opentelemetry-api==1.29.0
10+     # via
11+     #   -r requirements.in
12+     #   opentelemetry-sdk
13+     #   opentelemetry-semantic-conventions
14+ opentelemetry-sdk==1.29.0
15+     # via -r requirements.in
16+ opentelemetry-semantic-conventions==0.50b0
17+     # via opentelemetry-sdk
18+ typing-extensions==4.12.2
19+     # via opentelemetry-sdk
20+ wrapt==1.17.0
21+     # via deprecated
22+ zipp==3.21.0
23+     # via importlib-metadata
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments