Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .chloggen/feat-sqlqueryreciver-sap-ase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: receiver/sqlquery

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add support for SapASE (sybase) database connections

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36328]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
1 change: 1 addition & 0 deletions internal/sqlquery/db_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
_ "github.com/microsoft/go-mssqldb/integratedauth/krb5"
_ "github.com/sijms/go-ora/v2"
_ "github.com/snowflakedb/gosnowflake"
_ "github.com/thda/tds"
"go.uber.org/zap"
)

Expand Down
1 change: 1 addition & 0 deletions internal/sqlquery/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/sijms/go-ora/v2 v2.8.23
github.com/snowflakedb/gosnowflake v1.12.0
github.com/stretchr/testify v1.10.0
github.com/thda/tds v0.1.7
go.opentelemetry.io/collector/component v0.120.1-0.20250219144032-c2af75d88e89
go.opentelemetry.io/collector/component/componenttest v0.120.1-0.20250219144032-c2af75d88e89
go.opentelemetry.io/collector/pdata v1.26.1-0.20250219144032-c2af75d88e89
Expand Down
12 changes: 12 additions & 0 deletions internal/sqlquery/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions receiver/sqlqueryreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ The SQL Query Receiver uses custom SQL queries to generate metrics from a databa
The configuration supports the following top-level fields:

- `driver`(required): The name of the database driver: one of _postgres_, _mysql_, _snowflake_, _sqlserver_, _hdb_ (SAP
HANA), or _oracle_ (Oracle DB).
HANA), _oracle_ (Oracle DB), _tds_ (SapASE/Sybase).
- `datasource`(required): The datasource value passed to [sql.Open](https://pkg.go.dev/database/sql#Open). This is
a driver-specific string usually consisting of at least a database name and connection information. This is sometimes
referred to as the "connection string" in driver documentation.
e.g. _host=localhost port=5432 user=me password=s3cr3t sslmode=disable_
referred to as the "connection string" in driver documentation. Examples:
Comment thread
crobert-1 marked this conversation as resolved.
- [postgres](https://github.com/lib/pq) - `host=localhost port=5432 user=username password=user_password sslmode=disable`
- [mysql](https://github.com/go-sql-driver/mysql) - `username:user_password@tcp(localhost:3306)/db_name`
- [oracle](https://github.com/sijms/go-ora) - `oracle://username:user_password@localhost:1521/FREEPDB1`
- [sqlserver](https://github.com/go-sql-driver/mysql) - `sqlserver://username:user_password@localhost:1433?database=db_name`
- [sapAse](https://github.com/thda/tds) - `tds://username:user_password@localhost:5000/db_name`
- `queries`(required): A list of queries, where a query is a sql statement and one or more `logs` and/or `metrics` sections (details below).
- `collection_interval`(optional): The time interval between query executions. Defaults to _10s_.
- `storage` (optional, default `""`): The ID of a [storage][storage_extension] extension to be used to [track processed results](#tracking-processed-results).
Expand Down
1 change: 1 addition & 0 deletions receiver/sqlqueryreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ require (
github.com/sijms/go-ora/v2 v2.8.23 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/snowflakedb/gosnowflake v1.12.0 // indirect
github.com/thda/tds v0.1.7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
Expand Down
12 changes: 12 additions & 0 deletions receiver/sqlqueryreceiver/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading