<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:16:49 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>[SERVER-48330] Add logAttr overload for Milliseconds</title>
                <link>https://jira.mongodb.org/browse/SERVER-48330</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The logging of timing should be in milliseconds with the attribute &quot;durationMillis&quot; (though I believe structured logging manages the &quot;Millis&quot; part already). This is a good candidate for having a `logAttr` overload.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1357490">SERVER-48330</key>
            <summary>Add logAttr overload for Milliseconds</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 May 2020 18:05:02 +0000</created>
                <updated>Tue, 6 Dec 2022 02:26:25 +0000</updated>
                            <resolved>Thu, 30 Jul 2020 19:43:37 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3314548" author="connie.chen" created="Thu, 30 Jul 2020 19:43:37 +0000"  >&lt;p&gt;We failed to get consensus on how this will work, so we are abandoning this effort.&lt;/p&gt;</comment>
                            <comment id="3153753" author="bruce.lucas@10gen.com" created="Mon, 1 Jun 2020 19:26:30 +0000"  >&lt;p&gt;The methods you mention for surveying the codebase aren&apos;t practical for someone who doesn&apos;t do day-to-day development.&lt;/p&gt;

&lt;p&gt;How about instead of an overload for logAttr if we add (say) logCompletionDuration. This avoids duplicate constants, and is then easily searchable, and I believe reduces the likelihood of accidental misuse, because it has a name that suggests what its proper use is.&lt;/p&gt;</comment>
                            <comment id="3148400" author="henrik.edin" created="Mon, 1 Jun 2020 12:57:26 +0000"  >&lt;p&gt;I don&apos;t think text searching in the codebase is a stronger goal than usability / minimize frustration for engineers. There is value in not having to duplicate constants like this all over the code base. But that doesn&apos;t mean a helper like this should be misused, it should be used appropriately and when a different attribute name is needed it should be explicitly named instead of using this helper. &lt;/p&gt;

&lt;p&gt;Using an overload for this actually makes it easy to find all its uses, just with a different method than text searching. Indexing tools over the code should be able to figure it out or just the simple &quot;find all compile errors&quot; when removing the overload locally can be used.&lt;/p&gt;

&lt;p&gt;It also allow us to remove the special handling of Duration types in the log system and let this helper handle it instead.&lt;/p&gt;</comment>
                            <comment id="3107714" author="bruce.lucas@10gen.com" created="Tue, 26 May 2020 19:16:07 +0000"  >&lt;p&gt;I have another concern about this: if I want to survey the code to see if the &quot;durationMillis&quot; attr is being used correctly, I can just search for the strings &apos;&quot;duration&quot;&apos; and &apos;&quot;durationMillis&quot;&apos;; with this change it&apos;s no longer possible to find uses of those attributes in any straightforward way. Given the very specific meaning of the &quot;durationMillis&quot; attribute I think it would be best if any uses of it were very intentional.&lt;/p&gt;</comment>
                            <comment id="3107494" author="henrik.edin" created="Tue, 26 May 2020 17:56:48 +0000"  >&lt;p&gt;This could also handle converting durations of different units to milliseconds before logging.&lt;/p&gt;

&lt;p&gt;logAttrs(Seconds(3)) should be logged as &quot;durationMillis&quot;: 3000&lt;/p&gt;

</comment>
                            <comment id="3097979" author="bruce.lucas@10gen.com" created="Wed, 20 May 2020 18:49:23 +0000"  >&lt;p&gt;My concern is more along the lines that it might convey the impression to a developer that this will just &quot;do the right thing&quot; for any duration type, particularly as it hides the fact that it will generate a &quot;durationMillis&quot; attribute. Of course developers may make such a mistake anyway, but I think it may be less likely if they have to explicitly type the attribute name &quot;duration&quot;.&lt;/p&gt;</comment>
                            <comment id="3097896" author="daniel.gottlieb@10gen.com" created="Wed, 20 May 2020 18:17:54 +0000"  >&lt;p&gt;My understanding is that a programmer has to explicitly type &lt;tt&gt;logAttr(value)&lt;/tt&gt;.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;LOGV2(0, &quot;Message&quot;, &quot;otherPrefix&quot;_attr = duration) -&amp;gt; otherPrefixMillis: 20ms&lt;/li&gt;
	&lt;li&gt;LOGV2(0, &quot;Message&quot;, logAttr(value)) -&amp;gt; durationMillis: 20ms&lt;/li&gt;
	&lt;li&gt;LOGV2(0, &quot;Message&quot;, millisTypeValue) -&amp;gt; compile error&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ll certainly loop back if any of those assumptions do not hold.&lt;/p&gt;</comment>
                            <comment id="3097882" author="bruce.lucas@10gen.com" created="Wed, 20 May 2020 18:12:47 +0000"  >&lt;p&gt;May need to be careful that this doesn&apos;t encourage logging unwanted durations as &quot;duration&quot; attrs - that&apos;s only appropriate for logging a timespan that represents the completion of an operation.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 20 May 2020 18:12:47 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 27 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 27 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>connie.chen@mongodb.com</customfieldvalue>
            <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxm853:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxh27r:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxluef:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>