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

Parse the agent configuration based on the MIME type when fetching it via HTTP #268

Closed
mariusoe opened this issue Jul 9, 2019 · 3 comments · Fixed by #1251
Closed

Parse the agent configuration based on the MIME type when fetching it via HTTP #268

mariusoe opened this issue Jul 9, 2019 · 3 comments · Fixed by #1251
Assignees
Labels
area/agent enhancement New feature or request good first issue Good for newcomers

Comments

@mariusoe
Copy link
Member

mariusoe commented Jul 9, 2019

In the current state, the agent is able to fetch a configuration from a HTTP endpoint using its HttpPropertySource.

When a configuration is fetched, the agent considers it as a JSON. If the parsing fails - because it is not a JSON response - it will try to parse it using the YAML representation.

This behaviour should be optimized. The agent should immediately use the correct representation type (e.g. YAML) if a MIME type is provided in the response in order to prevent unnecessary Exception handling.

@mariusoe mariusoe added enhancement New feature or request good first issue Good for newcomers labels Jul 9, 2019
@durlabhcodes
Copy link

Hey! I'm interested in working upon it. Can you point me to the part of code where you're handling this?

@mariusoe
Copy link
Member Author

Hi @layzbot

it's nice to hear that you are interested in working on this issue.

Currently, this is handled is in the parseProperties method of the rocks.inspectit.ocelot.core.config.propertysources.http.HttpPropertySourceState class of the "core" project.

@danielgobona
Copy link
Contributor

It should be handled in HttpPropertySourceState class or PropertyUtils class?

heiko-holz pushed a commit to heiko-holz/inspectit-ocelot that referenced this issue Nov 18, 2021
heiko-holz pushed a commit to heiko-holz/inspectit-ocelot that referenced this issue Mar 7, 2022
heiko-holz pushed a commit to heiko-holz/inspectit-ocelot that referenced this issue Mar 8, 2022
heiko-holz pushed a commit to heiko-holz/inspectit-ocelot that referenced this issue Mar 14, 2022
mariusoe added a commit that referenced this issue Apr 4, 2022
…en fetching it via HTTP (#1251)

Co-authored-by: Marius Oehler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent enhancement New feature or request good first issue Good for newcomers
Projects
None yet
4 participants