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

"413 Content Too Large" when submitting metrics #75

Closed
kujeger opened this issue Jan 8, 2024 · 1 comment · Fixed by #76
Closed

"413 Content Too Large" when submitting metrics #75

kujeger opened this issue Jan 8, 2024 · 1 comment · Fixed by #76
Labels
bug Something isn't working

Comments

@kujeger
Copy link
Contributor

kujeger commented Jan 8, 2024

Describe the bug

Hi!

Testing out this Rust sdk and it works well for getting feature toggle status, but it always fails when submitting metrics, with this in the log:

WARN unleash_api_client::client > poll: error uploading feature metrics

after adding some debug lines in the library, it turns out that the actual error (that unfortunately gets swallowed in post_json) is along the lines of

413 Content Too Large
Error
Payload Too Large

Our unleash installation (at FINN.no) has a large amount of features, and digging through the code, it looks like the rust client tries to upload metrics for every single feature that exists -- even if I've only configured a UserFeatures enum with a single variant -- resulting in over 150KB of data.

Is this intentional and required? Naively I'd have guessed that it only made sens to upload metrics for the features defined in the enum passed to the client builder.

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

3.17

Subscription type

Open source

Hosting type

Self-hosted

SDK information (language and version)

No response

@kujeger kujeger added the bug Something isn't working label Jan 8, 2024
@kujeger
Copy link
Contributor Author

kujeger commented Jan 8, 2024

fwiw deleting these lines fixed the issues when testing:
kujeger@11fdff7

assuming it isn't too horrible a hack I'd be happy to make a PR out of it

edit: ah yeah, that breaks metrics for features checked with client.is_enabled_str(), so not exactly a proper fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant