Skip to content

Commit feac570

Browse files
committed
Seems to be working with entrypoints
1 parent 29aad2e commit feac570

File tree

8 files changed

+3171
-0
lines changed

8 files changed

+3171
-0
lines changed

bazel-repro/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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/

bazel-repro/BUILD

Whitespace-only changes.

bazel-repro/MODULE.bazel

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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")

bazel-repro/MODULE.bazel.lock

Lines changed: 3088 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel-repro/main/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
)

bazel-repro/main/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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)

bazel-repro/requirements.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
opentelemetry-api
2+
opentelemetry-sdk

bazel-repro/requirements.lock.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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

0 commit comments

Comments
 (0)