-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix: change DirectoryComponent to filter file paths by types #2391
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
10e6b34
Refactor DirectoryComponent to filter file paths by types
carlosrcoelho 44d6e3d
Merge branch 'dev' into cc/directory-component-fix
ogabrielluiz b576261
fix: sets types is_list to True
ogabrielluiz 22ff9c3
chore: Remove Optional from load_directory method signature
ogabrielluiz 2302f8d
chore: Update return type annotation for load_directory method
ogabrielluiz 8c18ceb
style(GroqModel.py): improve code readability by fixing indentation a…
ogabrielluiz e0c68b7
Merge branch 'main' into cc/directory-component-fix
ogabrielluiz 7037c38
refactor: change node to component on FE constants (#2545)
igorrCarvalho 65749b2
fix: refactor of api structure (#2544)
lucaseduoli 38f3963
feat: opentelemetry and prometheus (#2543)
zzzming 21a3e36
fix: update use-get-health.ts (#2553)
anovazzi1 de596ae
fix(ordering): correctly remove vertex from list of runnable vertices…
ogabrielluiz 0820d29
fix: version display (#2555)
anovazzi1 67ffc36
ci: add delete-reports job to delete if all jobs succeed (#2542)
ogabrielluiz 1ba463e
fix: pasting files not working (#2548)
igorrCarvalho b8f22ff
chore: Refactor load_directory method to handle types as a list
carlosrcoelho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/backend/base/langflow/services/telemetry/opentelemetry.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from opentelemetry import metrics | ||
from opentelemetry.exporter.prometheus import PrometheusMetricReader | ||
from opentelemetry.sdk.metrics import MeterProvider | ||
from opentelemetry.sdk.resources import Resource | ||
|
||
|
||
class OpenTelemetry: | ||
def __init__(self, prometheus_enabled: bool = True): | ||
resource = Resource.create({"service.name": "langflow"}) | ||
meter_provider = MeterProvider(resource=resource) | ||
self.prometheus_enabled = prometheus_enabled | ||
if prometheus_enabled: | ||
reader = PrometheusMetricReader() | ||
meter_provider = MeterProvider(resource=resource, metric_readers=[reader]) | ||
|
||
metrics.set_meter_provider(meter_provider) | ||
self.meter = meter_provider.get_meter("langflow") | ||
|
||
self._register_metrics() | ||
|
||
def _register_metrics(self): | ||
pass | ||
""" | ||
metrics can be registered in this function | ||
self.counter = self.meter.create_counter( | ||
name = "requests", | ||
unit = "bytes", | ||
description="The number of requests", | ||
) | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component is wrong I think. The
types
field should be a list field. That's why the self.types requires a call tosplit
but shouldn't.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ogabrielluiz Please verify the corrections applied.