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

Default value of period is not corresponding the XML-doc #147

Open
1 task done
mishamyte opened this issue Oct 15, 2022 · 3 comments
Open
1 task done

Default value of period is not corresponding the XML-doc #147

mishamyte opened this issue Oct 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@mishamyte
Copy link
Member

Which version of Serilog.Sinks.Grafana.Loki are you using?

v8.0.1

Which version of .NET are you using?

net6.0

Describe the bug

According to XML-doc, default value for period is 2 sec. According to underlying code - 1 sec

To Reproduce

Expected behavior

XML-doc and code behavior are similar

Log/SelfLog output or exception with stacktrace

No response

Application or code sample, which could be used to reproduce a bug

No response

Additional context

No response

I have read the documentation

@mishamyte mishamyte added the bug Something isn't working label Oct 15, 2022
@mishamyte mishamyte self-assigned this Oct 15, 2022
@mishamyte mishamyte added the documentation Improvements or additions to documentation label Oct 15, 2022
@mishamyte
Copy link
Member Author

This was broken when dependency to Serilog.Sinks.Http was removed

@mishamyte mishamyte added this to the Backlog milestone Oct 15, 2022
@snuup
Copy link

snuup commented Nov 2, 2024

Apparently the configuration value is also ignored:

.WriteTo.GrafanaLoki(
   "http://localhost:3100",
   period:TimeSpan.FromMilliseconds(200) // has no effect
 )

@mishamyte
Copy link
Member Author

Apparently the configuration value is also ignored:

.WriteTo.GrafanaLoki(
   "http://localhost:3100",
   period:TimeSpan.FromMilliseconds(200) // has no effect
 )

Hi @snuup,

Thank you for the report.
I feel like it's not ignored, but there is a tricky part there:
https://github.com/serilog-contrib/serilog-sinks-grafana-loki/blob/master/src/Serilog.Sinks.Grafana.Loki/Infrastructure/ExponentialBackoffConnectionSchedule.cs#L46

That part of code existed from the beginning of fork and prob should be revisited for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Development

No branches or pull requests

2 participants