Skip to content
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 subdomain for integration log pipelines #296

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion datadog_sync/model/logs_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]:
}

# Submit a log to the logs intake API to trigger the creation of the integration pipeline
await destination_client.post(self.logs_intake_path, payload, subdomain=self.logs_intake_subdomain)
subdomain = self.logs_intake_subdomain
if destination_client.url_object.subdomain != "api":
subdomain = f"{self.logs_intake_subdomain}.{destination_client.url_object.subdomain}"
Comment on lines +84 to +85

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation


await destination_client.post(self.logs_intake_path, payload, subdomain=subdomain)
created = False
for _ in range(12):
updated_pipelines = await self.get_destination_integration_pipelines()
Expand Down
Loading