Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

allowLOGFIRE_BASE_URL to acceptgrpc endpoints#1048

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
davidhewitt wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromdh/grpc

Conversation

davidhewitt
Copy link
Contributor

Related to#1042

The idea (from offline discussion) is that we can setLOGFIRE_BASE_URL to a grpc endpoint and everything can "just work", with the caveat that we wouldn't be able to do any token checking.

This is sufficient for a local test script to work for me:

# /// script# requires-python = ">=3.11"# dependencies = [#   "logfire[grpc]",# ]# ///importosimportlogfireos.environ['LOGFIRE_BASE_URL']='grpc://localhost:4317'logfire.configure(# Setting a service name is good practice in general, but especially# important for Jaeger, otherwise spans will be labeled as 'unknown_service'service_name='my_logfire_service',)withlogfire.span('This is a span'):logfire.info('Logfire logs are also actually just spans!')

Steps to complete before merge:

  • Update documentation for OTEL collectors
  • Testing - not sure how much we want this covered? It seems painful to start up a full GRPC endpoint in testing, maybe there's a mock solution?

@cloudflare-workers-and-pagesCloudflare Workers and Pages
Copy link

cloudflare-workers-and-pagesbot commentedApr 30, 2025
edited
Loading

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit:25d335a
Status: ✅  Deploy successful!
Preview URL:https://a37bb325.logfire-docs.pages.dev
Branch Preview URL:https://dh-grpc.logfire-docs.pages.dev

View logs

self.token = credentials.token
self.advanced.base_url = self.advanced.base_url or credentials.logfire_api_url
except LogfireConfigError:
if self.advanced.base_url is not None:
Copy link
Member

Choose a reason for hiding this comment

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

I think we should only allow this if it is a grpc url?

Alternatively, perhaps we could split the logic, and have different code paths depending on whether the endpoint is HTTP/gRPC

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alexmojakialexmojakialexmojaki left review comments

@ViicosViicosViicos left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@davidhewitt@alexmojaki@Viicos

[8]ページ先頭

©2009-2025 Movatter.jp