<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:54 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[KAFKA-229] Monitor the Kafka Source Connector Lag Compared to Source Cluster</title>
                <link>https://jira.mongodb.org/browse/KAFKA-229</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;Hi Team,&lt;/p&gt;

&lt;p&gt;At the moment, the Kafka Source Connector provides no easy way to understand how far behind the Connector is in relationship to the associated Change Stream of the Source Cluster.&lt;/p&gt;

&lt;p&gt;Being aware of that lag and being able to easily implement monitoring and alerting based on it would be really helpful because of the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Although there might be different thresholds based on use case, lag issues negatively affect the associated data pipeline.&lt;/li&gt;
	&lt;li&gt;Avoid the Source Connector&apos;s resume token from falling off the oplog.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Nowadays, a custom monitoring solution consisting of a consumer that does the following could be implemented as a workaround:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Consumes messages from the &lt;em&gt;connect-offsets&lt;/em&gt; topic, filters for the required Connector based on message key, decodes the resume token, and obtains the &lt;em&gt;clusterTime&lt;/em&gt; from the decoded output.&lt;/li&gt;
	&lt;li&gt;Synchronously retrieves the &lt;em&gt;lastCommittedOpTime&lt;/em&gt; from the Source MongoDB Deployment.&lt;/li&gt;
	&lt;li&gt;Compares (1) and (2) and alerts based on a significant delta it finds.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Although feasible, this solution requires development effort and gets more complicated when dealing with a Cluster with more than one Shard. Some solutions that came up after some discussion are: &lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Add the lag as a metric that can be exported to common monitoring applications like Datadog.&lt;/li&gt;
	&lt;li&gt;Incorporate &lt;em&gt;lastCommittedOpTime&lt;/em&gt; into the message value for the &lt;em&gt;connect-offsets&lt;/em&gt; topic so that the information can be more easily retrieved, making the custom monitoring solution easier to implement.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I&apos;m open to any other suggestions that might make help accomplish this.&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
Diego&lt;/p&gt;</description>
                <environment></environment>
        <key id="1766229">KAFKA-229</key>
            <summary>Monitor the Kafka Source Connector Lag Compared to Source Cluster</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="maxim.katcharov@mongodb.com">Maxim Katcharov</assignee>
                                    <reporter username="diego.rodriguez@mongodb.com">Diego Rodriguez</reporter>
                        <labels>
                            <label>internal-user</label>
                    </labels>
                <created>Wed, 2 Jun 2021 15:01:35 +0000</created>
                <updated>Fri, 2 Sep 2022 14:41:25 +0000</updated>
                            <resolved>Wed, 10 Aug 2022 19:26:56 +0000</resolved>
                                    <version>1.5.0</version>
                                    <fixVersion>1.8.0</fixVersion>
                                    <component>Source</component>
                                        <votes>7</votes>
                                    <watches>17</watches>
                                                                                                                <comments>
                            <comment id="4741994" author="JIRAUSER1269643" created="Wed, 10 Aug 2022 19:26:56 +0000"  >&lt;p&gt;Closed as duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-64&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/KAFKA-64&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="903752">KAFKA-64</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1881048">KAFKA-251</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1793614">SERVER-57986</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="903752">KAFKA-64</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000vcyUrQAI, 5002K00000xkPr9QAE, 5002K00000yTqhzQAC, 5006R00001nIVS0QAO]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>KAFKA-304</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3mmh:0400000942l</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>