8000 feat: add Kafka topic setup and recent spans polling endpoint by koxudaxi · Pull Request #516 · Mirascope/lilypad · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add Kafka topic setup and recent spans polling endpoint #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

koxudaxi
Copy link
Collaborator
@koxudaxi koxudaxi commented Jun 3, 2025

No description provided.

@codecov-commenter
Copy link
codecov-commenter commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 57.65921% with 246 lines in your changes missing coverage. Please review.

Project coverage is 54.10%. Comparing base (df0dd39) to head (133b933).
Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
...pp/lilypad/server/services/span_queue_processor.py 67.12% 96 Missing ⚠️
app/lilypad/server/services/kafka_setup.py 0.00% 78 Missing ⚠️
app/lilypad/server/main.py 0.00% 43 Missing ⚠️
app/lilypad/server/logging_config.py 0.00% 15 Missing ⚠️
app/lilypad/server/services/kafka.py 89.69% 10 Missing ⚠️
app/lilypad/server/api/v0/traces_api.py 86.66% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (df0dd39) and HEAD (133b933). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (df0dd39) HEAD (133b933)
App-ubuntu-latest-python3.12 1 0
App-ubuntu-latest-python3.10 1 0
App-ubuntu-latest-python3.11 1 0
SDK-ubuntu-latest-python3.10 1 0
SDK-ubuntu-latest-python3.11 1 0
SDK-ubuntu-latest-python3.12 1 0
SDK-ubuntu-latest-python3.13 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
- Coverage   59.29%   54.10%   -5.19%     
==========================================
  Files         341      122     -219     
  Lines       17075     5205   -11870     
==========================================
- Hits        10124     2816    -7308     
+ Misses       6951     2389    -4562     
Flag Coverage Δ
App-ubuntu-latest-python3.10 ?
App-ubuntu-latest-python3.11 ?
App-ubuntu-latest-python3.12 ?
App-ubuntu-latest-python3.13 54.10% <57.65%> (+0.34%) ⬆️
SDK-ubuntu-latest-python3.10 ?
SDK-ubuntu-latest-python3.11 ?
SDK-ubuntu-latest-python3.12 ?
SDK-ubuntu-latest-python3.13 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS mer 8000 ges.


self.log.debug(f"Spans {response.trace_status}: {response.span_count} spans")
if response.trace_status == "queued" and response.span_count > 0:
# When using Kafka queue, we don't get database UUIDs back immediately
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get some span_uuid from the initial add to queue, so shouldn't we be able to get some uuids back? If not, then even returning back the trace_id would be really useful, and I can always render the client using trace_id if we dont have uuid.


return False

async def send_span(self, span_data: dict[str, Any], user_id: UUID) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried this class will get really bloated when we add more topics. These functions, send_span and send_spans_batch feel like they could be more generic.

We could take in a topic as an argument, some key, and some data.

Our KafkaService can depend on get_current_user so we don't need to pass in user_id.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0