Skip to content

Conversation

lambaaryan011
Copy link

Pull Request

Description

This PR adds Sentry integration to the satellite-consumer project. The integration helps in error tracking and performance monitoring by capturing exceptions and logs throughout the data processing pipeline.

Fixes #5

How Has This Been Tested?

⇾ Verified that errors are properly captured in Sentry by intentionally triggering an exception.

⇾ Ran the full data processing pipeline to ensure no breaking changes were introduced.

⇾ Logged relevant metadata (satellite name, time window, etc.) in Sentry for better debugging.

  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

Signed-off-by: aryan lamba <aryanlamba54@gmail.com>
@lambaaryan011
Copy link
Author

@peterdudfield can you take a look
and I am looking for communication channels where we can discuss some doubt. Is any exists ?

@peterdudfield
Copy link
Contributor

@peterdudfield can you take a look and I am looking for communication channels where we can discuss some doubt. Is any exists ?

What do you want to discuss? About this issue?

@lambaaryan011
Copy link
Author

@peterdudfield can you take a look and I am looking for communication channels where we can discuss some doubt. Is any exists ?

What do you want to discuss? About this issue?

may be if i get issue so for that

@lambaaryan011
Copy link
Author

@peterdudfield have a look i thank at this time all are good .
or there any personal communication channels available for GSoC 2025 candidates?

@peterdudfield
Copy link
Contributor

@peterdudfield have a look i thank at this time all are good . or there any personal communication channels available for GSoC 2025 candidates?

Not currently. Please ask on the relevant discussion in https://github.com/orgs/openclimatefix/discussions/categories/project-ideas-2025

@lambaaryan011
Copy link
Author

@peterdudfield have a look

Signed-off-by: aryan lamba <aryanlamba54@gmail.com>
@lambaaryan011
Copy link
Author

@devsjc have a look

@devsjc
Copy link
Contributor

devsjc commented Mar 3, 2025

@peterdudfield Is our sentry environment "production" regardless of where the code is deployed? Or should that be an environment variable?

@peterdudfield
Copy link
Contributor

It should be an env var

@lambaaryan011
Copy link
Author

@devsjc I update the environment so can you look at this

@lambaaryan011
Copy link
Author

@peterdudfield I think now all things are done that you told me, so look at this ?

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

I think this is good, but ill get @devsjc to double check it

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

Looks fine to me, just want @devsjc to check

@lambaaryan011
Copy link
Author

Hi @devsjc ,

Just following up on my PR. Could you please review it when you get a chance? Let me know if any changes are needed

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

Please look at files changes, and you'll see some obvious mistakes

@lambaaryan011
Copy link
Author

Please look at files changes, and you'll see some obvious mistakes

I don’t see an issue, but for better clarity and performance, I optimized the code.

sentry_sdk.set_tag("app_name", "satellite_consumer")
sentry_sdk.set_tag("version", __version__)

def _consume_command(command_opts: ArchiveCommandOptions | ConsumeCommandOptions) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

can you reset all changes below this, if you want to do this, please put in a different PR and explain what they are for and why

Copy link
Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

Choose a reason for hiding this comment

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

if there is green lines below here, then it means new lines have been added

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

see comments. Only add sentry code, dont add any other changes please

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

Lines 46 to 53 are good (and the import statement).

All other changes should be removed

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.

add sentry in
3 participants