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

Add MS SQL Server Errorlog Support #1687

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Caleb-Hurshman
Copy link
Contributor

Description

This PR adds support for Microsoft SQL Server error logs.

Related issue

Code for this PR references this PR from 03/2022

How has this been tested?

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

Copy link

google-cla bot commented Apr 25, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

apps/mssql.go Outdated Show resolved Hide resolved
apps/mssql.go Outdated Show resolved Hide resolved
}

func (p LoggingProcessorMssqlLog) Components(ctx context.Context, tag string, uid string) []fluentbit.Component {
c := confgenerator.LoggingProcessorParseRegex{
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition to the Regex, we need the parser shared section that tells fluentbit how to parse the timestamp. the one below is copied from saphana so it's not the right field/format.

ParserShared: confgenerator.ParserShared{
			TimeKey:    "time",
			TimeFormat: "%Y-%m-%d %H:%M:%S.%L",
}
			

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original PR calls this out:

// Not sending the log timestamp "logtime" from above in as the Time_Key as there will be time zone issues.
// MS SQL Server writes logs in server time, not a standard time zone such as UTC

I can add these comments in

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll add the comment and see how the ops-agent team would like to handle it.

@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 25, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 25, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 25, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 25, 2024
@Caleb-Hurshman Caleb-Hurshman marked this pull request as ready for review April 26, 2024 13:40
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 26, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 29, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 29, 2024
@dehaansa dehaansa added the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 29, 2024
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Apr 29, 2024
@jefferbrecht
Copy link
Member

Just giving an update from our side chats: this is blocked on not having UTF-16 support in Fluent Bit, and that support has not yet been prioritized. We'll give another update here once that changes.

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.

4 participants